1
0
mirror of https://github.com/mastodon/mastodon synced 2025-01-23 02:03:31 +09:00

Convert admin/terms_of_service/histories spec controller->system (#33534)

This commit is contained in:
Matt Jankowski 2025-01-10 04:11:57 -05:00 committed by GitHub
parent 1d680f1941
commit a8b0152bc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 21 deletions

View File

@ -1,21 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Admin::TermsOfService::HistoriesController do
render_views
let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
end
describe 'GET #show' do
it 'returns http success' do
get :show
expect(response).to have_http_status(:success)
end
end
end

View File

@ -0,0 +1,21 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'Admin Terms of Service Histories' do
let(:current_user) { Fabricate(:admin_user) }
before { sign_in(current_user) }
describe 'Viewing TOS histories' do
before { Fabricate :terms_of_service, changelog: 'The changelog notes from v1 are here' }
it 'shows previous terms versions' do
visit admin_terms_of_service_history_path
expect(page)
.to have_content(I18n.t('admin.terms_of_service.history'))
.and have_content(/changelog notes from v1/)
end
end
end