2023-09-01 15:47:07 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 05:12:25 +00:00
|
|
|
RSpec.describe 'finding software updates through the admin interface' do
|
2023-09-01 15:47:07 +00:00
|
|
|
before do
|
|
|
|
Fabricate(:software_update, version: '99.99.99', type: 'major', urgent: true, release_notes: 'https://github.com/mastodon/mastodon/releases/v99')
|
|
|
|
|
|
|
|
sign_in Fabricate(:user, role: UserRole.find_by(name: 'Owner')), scope: :user
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'shows a link to the software updates page, which links to release notes' do
|
|
|
|
visit settings_profile_path
|
2024-01-04 09:20:32 +00:00
|
|
|
click_on I18n.t('admin.critical_update_pending')
|
2023-09-01 15:47:07 +00:00
|
|
|
|
|
|
|
expect(page).to have_title(I18n.t('admin.software_updates.title'))
|
|
|
|
|
|
|
|
expect(page).to have_content('99.99.99')
|
|
|
|
|
2024-01-04 09:20:32 +00:00
|
|
|
click_on I18n.t('admin.software_updates.release_notes')
|
2023-09-01 15:47:07 +00:00
|
|
|
expect(page).to have_current_path('https://github.com/mastodon/mastodon/releases/v99', url: true)
|
|
|
|
end
|
|
|
|
end
|