software_updates_spec.rb 836 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe 'finding software updates through the admin interface' do
  4. before do
  5. Fabricate(:software_update, version: '99.99.99', type: 'major', urgent: true, release_notes: 'https://github.com/mastodon/mastodon/releases/v99')
  6. sign_in Fabricate(:user, role: UserRole.find_by(name: 'Owner')), scope: :user
  7. end
  8. it 'shows a link to the software updates page, which links to release notes' do
  9. visit settings_profile_path
  10. click_link I18n.t('admin.critical_update_pending')
  11. expect(page).to have_title(I18n.t('admin.software_updates.title'))
  12. expect(page).to have_content('99.99.99')
  13. click_link I18n.t('admin.software_updates.release_notes')
  14. expect(page).to have_current_path('https://github.com/mastodon/mastodon/releases/v99', url: true)
  15. end
  16. end