diff --git a/spec/services/flags/destroy_flag_spec.rb b/spec/services/flags/destroy_flag_spec.rb index 1d48cd4562a..8569cdb3055 100644 --- a/spec/services/flags/destroy_flag_spec.rb +++ b/spec/services/flags/destroy_flag_spec.rb @@ -3,9 +3,9 @@ RSpec.describe(Flags::DestroyFlag) do subject(:result) { described_class.call(**params, **dependencies) } - fab!(:flag) fab!(:current_user) { Fabricate(:admin) } + let(:flag) { Fabricate(:flag) } let(:params) { { id: flag_id } } let(:dependencies) { { guardian: current_user.guardian } } let(:flag_id) { flag.id } diff --git a/spec/services/flags/toggle_flag_spec.rb b/spec/services/flags/toggle_flag_spec.rb index 2b6f5527754..3ba43240ba3 100644 --- a/spec/services/flags/toggle_flag_spec.rb +++ b/spec/services/flags/toggle_flag_spec.rb @@ -8,9 +8,9 @@ RSpec.describe(Flags::ToggleFlag) do describe ".call" do subject(:result) { described_class.call(**params, **dependencies) } - fab!(:flag) fab!(:current_user) { Fabricate(:admin) } + let(:flag) { Fabricate(:flag) } let(:flag_id) { flag.id } let(:params) { { flag_id: flag_id } } let(:dependencies) { { guardian: current_user.guardian } } diff --git a/spec/services/flags/update_flag_spec.rb b/spec/services/flags/update_flag_spec.rb index 3060debd7cf..17fcde871a0 100644 --- a/spec/services/flags/update_flag_spec.rb +++ b/spec/services/flags/update_flag_spec.rb @@ -13,9 +13,9 @@ RSpec.describe(Flags::UpdateFlag) do describe ".call" do subject(:result) { described_class.call(**params, **dependencies) } - fab!(:flag) fab!(:current_user) { Fabricate(:admin) } + let(:flag) { Fabricate(:flag) } let(:params) { { id: flag_id, name:, description:, applies_to:, require_message:, enabled: } } let(:dependencies) { { guardian: current_user.guardian } } let(:flag_id) { flag.id }