Sha256: e640e2d8c35967a58da4c92336d14f8f5026c923011af94b2b8136f38549c9d2
Contents?: true
Size: 673 Bytes
Versions: 3
Compression:
Stored size: 673 Bytes
Contents
require File.expand_path('../../test_helper', __FILE__) class RescueFromTest < ActionDispatch::IntegrationTest setup { open_session } def with_user end def controller_raises(exception) with_configured_user ConsoleIndexController.any_instance.expects(:index).raises(exception) with_rescue_from do get '/', nil, {'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(@user.login, @user.password)} end end def default_error_message /An error has occurred/i end test 'render unexpected error page' do controller_raises(ActiveResource::ConnectionError.new(nil)) assert_error_page end end
Version data entries
3 entries across 3 versions & 1 rubygems