diff --git a/spec/controllers/admin/terms_of_service/histories_controller_spec.rb b/spec/controllers/admin/terms_of_service/histories_controller_spec.rb deleted file mode 100644 index 8c2c3a3de3..0000000000 --- a/spec/controllers/admin/terms_of_service/histories_controller_spec.rb +++ /dev/null @@ -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 diff --git a/spec/system/admin/terms_of_service/histories_spec.rb b/spec/system/admin/terms_of_service/histories_spec.rb new file mode 100644 index 0000000000..aa59550d09 --- /dev/null +++ b/spec/system/admin/terms_of_service/histories_spec.rb @@ -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