DEV: Improve error message when test fails (#25067)
Why this change? The two tests being updated in question has been flaky on CI. However, when using `be_forbidden`, the error message does not indicate what the actual response code was making it hard for us to debug. What does this change do? Assert for the exact response status code we are expecting.
This commit is contained in:
parent
ce57969016
commit
6e8c2bb4ab
|
@ -7,7 +7,7 @@ RSpec.describe FinishInstallationController do
|
||||||
|
|
||||||
it "doesn't allow access" do
|
it "doesn't allow access" do
|
||||||
get "/finish-installation"
|
get "/finish-installation"
|
||||||
expect(response).to be_forbidden
|
expect(response.status).to eq(403)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ RSpec.describe FinishInstallationController do
|
||||||
|
|
||||||
it "doesn't allow access" do
|
it "doesn't allow access" do
|
||||||
get "/finish-installation/register"
|
get "/finish-installation/register"
|
||||||
expect(response).to be_forbidden
|
expect(response.status).to eq(403)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue