Skip to content

Commit

Permalink
Add a few more multiple actor specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Mar 20, 2023
1 parent 99c79eb commit 8497a34
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/flipper_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@
it 'returns true for truthy block values' do
expect(feature.enabled?(flipper.actor(admin_truthy_actor))).to eq(true)
end

it 'returns true if any actor is in enabled group' do
expect(feature.enabled?(dev_actor, admin_actor)).to be(true)
end
end

context 'for actor in disabled group' do
Expand Down Expand Up @@ -408,6 +412,10 @@
expect(feature.enabled?(clooney)).to eq(false)
end

it 'returns false if all actors are disabled' do
expect(feature.enabled?(clooney, pitt)).to be(false)
end

it 'returns true if boolean enabled' do
feature.enable
expect(feature.enabled?(clooney)).to eq(true)
Expand Down Expand Up @@ -513,6 +521,10 @@
expect(feature.enabled?(dev_actor)).to eq(false)
end

it 'retruns true if any actor is true' do
expect(feature.enabled?(admin_actor, dev_actor)).to eq(true)
end

it 'returns true if boolean enabled' do
feature.enable
expect(feature.enabled?(admin_actor)).to eq(true)
Expand Down

0 comments on commit 8497a34

Please sign in to comment.