diff --git a/spec/features/errors/internal_server_error_500_spec.rb b/spec/features/errors/internal_server_error_500_spec.rb deleted file mode 100644 index 17232ac04..000000000 --- a/spec/features/errors/internal_server_error_500_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'rails_helper' - -describe 'custom 500 error page', type: :feature do -=begin - manipulate the Rails configs so that we can see custom error pages whilst in the development AND testing environment. Set them back to their original values after the tests have been ran -=end - before do - Rails.application.config.consider_all_requests_local = false - Rails.application.config.action_dispatch.show_exceptions = true - end - - after do - Rails.application.config.consider_all_requests_local = true - Rails.application.config.action_dispatch.show_exceptions = false - end - - it 'should respond with the custom 404 page if the user visits a non-existent page' do - visit '/500' - expect(page).to have_content('Internal server error') - expect(page).to have_content('We\'re sorry, something went wrong. We\'re working to fix it as soon as we can. Please check back in 30 minutes.') - end -end \ No newline at end of file diff --git a/spec/requests/errors_controller_spec.rb b/spec/requests/errors_controller_spec.rb index e5ea75e84..66a0cf2be 100644 --- a/spec/requests/errors_controller_spec.rb +++ b/spec/requests/errors_controller_spec.rb @@ -19,4 +19,11 @@ expect(response.body).to include('Page not found') expect(response.body).to include("We're sorry, we can't find the page you're looking for") end + + it '500 error' do + get '/500' + expect(response).to have_http_status(:error) + expect(response.body).to include('Internal server error') + expect(response.body).to include("We're sorry, something went wrong. We're working to fix it as soon as we can.") + end end \ No newline at end of file