mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 17:35:40 +01:00
Add system spec for Admin::TermsOfService
index view (#33250)
This commit is contained in:
parent
ded799f913
commit
094e2172ec
1 changed files with 21 additions and 0 deletions
21
spec/system/admin/terms_of_service_spec.rb
Normal file
21
spec/system/admin/terms_of_service_spec.rb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe 'Admin Terms of services' do
|
||||||
|
describe 'Viewing terms of services index page' do
|
||||||
|
let!(:terms) { Fabricate :terms_of_service, text: 'Test terms' }
|
||||||
|
|
||||||
|
before { sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
|
||||||
|
|
||||||
|
it 'allows tags listing and editing' do
|
||||||
|
visit admin_terms_of_service_index_path
|
||||||
|
|
||||||
|
expect(page)
|
||||||
|
.to have_title(I18n.t('admin.terms_of_service.title'))
|
||||||
|
|
||||||
|
expect(page)
|
||||||
|
.to have_content(terms.text)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue