spec/integration/rack_app/middleware_spec.rb in hanami-2.1.0.beta1 vs spec/integration/rack_app/middleware_spec.rb in hanami-2.1.0.beta2
- old
+ new
@@ -315,11 +315,11 @@
end
it "excludes not found routes in root scope" do
get "/foo"
- expect(last_response.status).to eq 500
+ expect(last_response.status).to eq 404
expect(last_response.headers).to_not have_key("X-Auth-User-ID")
end
context "within slice" do
it "uses Rack middleware" do
@@ -331,11 +331,11 @@
end
it "does not uses the Rack middleware for not found paths" do
get "/admin/users"
- expect(last_response.status).to eq 500
+ expect(last_response.status).to eq 404
expect(last_response.headers).not_to have_key("X-Auth-User-ID")
end
end
end
@@ -598,11 +598,11 @@
end
it "does not use Rack middleware for other paths" do
get "/__not_found__"
- expect(last_response.status).to eq 500
+ expect(last_response.status).to eq 404
expect(last_response.headers).not_to have_key("X-Identifier-Root")
expect(last_response.headers).not_to have_key("X-Elapsed")
expect(last_response.headers).not_to have_key("X-Auth-User-ID")
expect(last_response.headers).not_to have_key("X-API-Rate-Limit-Quota")
expect(last_response.headers).not_to have_key("X-API-Version")
@@ -621,10 +621,10 @@
end
it "uses Rack middleware for other paths" do
get "/admin/__not_found__"
- expect(last_response.status).to eq 500
+ expect(last_response.status).to eq 404
expect(last_response.headers).not_to have_key("X-Identifier-Admin")
expect(last_response.headers).not_to have_key("X-Elapsed")
expect(last_response.headers).not_to have_key("X-Elapsed")
expect(last_response.headers).not_to have_key("X-Auth-User-ID")
expect(last_response.headers).not_to have_key("X-API-Rate-Limit-Quota")