From 3cc0cb391cd3d7b54eedb5f395a089a3070e95cf Mon Sep 17 00:00:00 2001 From: Nils Rauch Date: Tue, 14 Nov 2023 10:09:50 +0100 Subject: [PATCH] Stub featuregate --- spec/features/event_register_managed_spec.rb | 6 ++++++ spec/features/external_event_register_manager_spec.rb | 1 + 2 files changed, 7 insertions(+) diff --git a/spec/features/event_register_managed_spec.rb b/spec/features/event_register_managed_spec.rb index f056ecdc..613dc333 100644 --- a/spec/features/event_register_managed_spec.rb +++ b/spec/features/event_register_managed_spec.rb @@ -32,6 +32,7 @@ context 'with feature toggle disabled' do before do + allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false) allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(false) end @@ -46,6 +47,7 @@ context 'with feature toggle enabled' do before do + allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false) allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(true) end @@ -103,6 +105,7 @@ context 'with feature toggle disabled' do before do + allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false) allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(false) end @@ -115,6 +118,7 @@ context 'with feature toggle enabled' do before do + allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false) allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(true) end @@ -153,6 +157,7 @@ describe 'registering new managed' do context 'with feature toggle disabled' do before do + allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false) allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(false) end @@ -167,6 +172,7 @@ context 'with feature toggle enabled' do before do + allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false) allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(true) end diff --git a/spec/features/external_event_register_manager_spec.rb b/spec/features/external_event_register_manager_spec.rb index 9fa6a3e8..747fbae8 100644 --- a/spec/features/external_event_register_manager_spec.rb +++ b/spec/features/external_event_register_manager_spec.rb @@ -30,6 +30,7 @@ context 'with feature toggle enabled' do before do + allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false) allow(FeatureGate).to receive(:enabled?).with('groups.self_registration').and_return(false) allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(true) allow_any_instance_of(FeatureGate).to receive(:enabled?).and_return(true)