spec/rails/auth/error_page/middleware_spec.rb in rails-auth-0.2.0 vs spec/rails/auth/error_page/middleware_spec.rb in rails-auth-0.3.0
- old
+ new
@@ -13,10 +13,10 @@
expect(response.first).to eq code
end
end
context "access denied" do
- let(:app) { ->(_env) { fail(Rails::Auth::NotAuthorizedError, "not authorized!") } }
+ let(:app) { ->(_env) { raise(Rails::Auth::NotAuthorizedError, "not authorized!") } }
it "renders the error page" do
code, _env, body = middleware.call(request)
expect(code).to eq 403
expect(body).to eq [error_page]