Sha256: e2da5feb5bc3eac10a1df329520f3fd4b8eb5141208376b8cdb05c0b7722f042
Contents?: true
Size: 781 Bytes
Versions: 11
Compression:
Stored size: 781 Bytes
Contents
require 'rails_helper' require 'lhc/test/cache_helper.rb' describe 'Error handling with chains', type: :request do let!(:request) do stub_request(:get, "http://datastore/v2/records?color=blue") .to_return(status: 404) end it 'handles errors in rails controllers when query resolved in controller', dummy_models: true do get '/error_handling_with_chains/fetch_in_controller' expect(request).to have_been_made.once expect(response.body).to include('Sorry there was an error.') end it 'handles errors in rails controllers when query resolved in view', dummy_models: true do get '/error_handling_with_chains/fetch_in_view' expect(request).to have_been_made.once expect(response.body).to include('Sorry there was an error.') end end
Version data entries
11 entries across 11 versions & 1 rubygems