mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 05:07:42 -05:00
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:
@@ -7,7 +7,7 @@ RSpec.describe FinishInstallationController do
|
||||
|
||||
it "doesn't allow access" do
|
||||
get "/finish-installation"
|
||||
expect(response).to be_forbidden
|
||||
expect(response.status).to eq(403)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ RSpec.describe FinishInstallationController do
|
||||
|
||||
it "doesn't allow access" do
|
||||
get "/finish-installation/register"
|
||||
expect(response).to be_forbidden
|
||||
expect(response.status).to eq(403)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user