Skip to content

Commit

Permalink
Stub featuregate
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWalkingLeek committed Nov 14, 2023
1 parent d0e7ce9 commit 3cc0cb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/features/event_register_managed_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions spec/features/external_event_register_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3cc0cb3

Please sign in to comment.