mirror of https://github.com/mastodon/mastodon
Convert `admin/terms_of_service/histories` spec controller->system (#33534)
parent
1d680f1941
commit
a8b0152bc5
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue