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:
Krzysztof Kotlarek 2024-06-07 13:53:40 +10:00 committed by GitHub
parent aef3f17b56
commit 35792ea18c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,7 @@ RSpec.describe(ToggleFlag) do
context "when user is allowed to perform the action" do
fab!(:current_user) { Fabricate(:admin) }
after { flag.update!(enabled: true) }
after { flag.reload.update!(enabled: true) }
it "sets the service result as successful" do
expect(result).to be_a_success