catch_all_route_request_spec.rb 516 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe 'The catch all route' do
  4. describe 'with a simple value' do
  5. it 'returns a 404 page as html' do
  6. get '/test'
  7. expect(response).to have_http_status 404
  8. expect(response.media_type).to eq 'text/html'
  9. end
  10. end
  11. describe 'with an implied format' do
  12. it 'returns a 404 page as html' do
  13. get '/test.test'
  14. expect(response).to have_http_status 404
  15. expect(response.media_type).to eq 'text/html'
  16. end
  17. end
  18. end