DEV: Fix controller tests failing in parallel suite only (#30314)
These controller tests are passing locally and in CI, but are failing the build when run in parallel.
I managed to recreate the failures by running the entire suite with turbo_spec and the right seed locally. After these changes, the parallel suite passes locally as well. 🤞
This commit is contained in:
parent
c2f7da3298
commit
d56346982f
|
@ -16,6 +16,8 @@ RSpec.describe SessionController do
|
|||
end
|
||||
end
|
||||
|
||||
before { SiteSetting.hide_email_address_taken = false }
|
||||
|
||||
describe "#email_login_info" do
|
||||
let(:email_token) do
|
||||
Fabricate(:email_token, user: user, scope: EmailToken.scopes[:email_login])
|
||||
|
|
|
@ -19,6 +19,8 @@ RSpec.describe UsersController do
|
|||
# late for fab! to work.
|
||||
let(:user_deferred) { Fabricate(:user, refresh_auto_groups: true) }
|
||||
|
||||
before { SiteSetting.hide_email_address_taken = false }
|
||||
|
||||
describe "#full account registration flow" do
|
||||
it "will correctly handle honeypot and challenge" do
|
||||
get "/session/hp.json"
|
||||
|
@ -1013,8 +1015,6 @@ RSpec.describe UsersController do
|
|||
end
|
||||
|
||||
context "when creating as active" do
|
||||
before { SiteSetting.hide_email_address_taken = false }
|
||||
|
||||
it "won't create the user as active" do
|
||||
post "/u.json", params: post_user_params.merge(active: true)
|
||||
expect(response.status).to eq(200)
|
||||
|
@ -2044,8 +2044,6 @@ RSpec.describe UsersController do
|
|||
end
|
||||
|
||||
describe "#check_email" do
|
||||
before { SiteSetting.hide_email_address_taken = false }
|
||||
|
||||
it "returns success if hide_email_address_taken is true" do
|
||||
SiteSetting.hide_email_address_taken = true
|
||||
|
||||
|
|
Loading…
Reference in New Issue