mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:52:50 +08:00
FIX: flaky specs related to flags (#27380)
Because the flag was not reloaded and contained old values, `update! `was not triggered and didn't clean flags to the original state.
This commit is contained in:
parent
aef3f17b56
commit
35792ea18c
|
@ -14,7 +14,7 @@ RSpec.describe(ToggleFlag) do
|
||||||
context "when user is allowed to perform the action" do
|
context "when user is allowed to perform the action" do
|
||||||
fab!(:current_user) { Fabricate(:admin) }
|
fab!(:current_user) { Fabricate(:admin) }
|
||||||
|
|
||||||
after { flag.update!(enabled: true) }
|
after { flag.reload.update!(enabled: true) }
|
||||||
|
|
||||||
it "sets the service result as successful" do
|
it "sets the service result as successful" do
|
||||||
expect(result).to be_a_success
|
expect(result).to be_a_success
|
||||||
|
|
Loading…
Reference in New Issue
Block a user