Skip to content

Commit

Permalink
Merge pull request #3957 from 3scale/fix-permissions-test-bug
Browse files Browse the repository at this point in the history
Fix incorrect member permission service
  • Loading branch information
mayorova authored Jan 13, 2025
2 parents 6eaea5a + dacc3a6 commit c982bdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit/abilities/provider_any_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_policies_not_tenant

test 'Cinstance/Application events can show if has :partners and access to the service if there is a service' do
service = FactoryBot.create(:simple_service, account: @account)
another_service = FactoryBot.create(:simple_service, account: @account)
plan = FactoryBot.create(:simple_application_plan, issuer: service)
cinstance = FactoryBot.create(:cinstance, plan: plan)
cinstance_events = [
Expand All @@ -45,7 +46,7 @@ def test_policies_not_tenant

assert_cannot ability, :show, cinstance_event

user.member_permission_service_ids = [FactoryBot.create(:cinstance).id]
user.member_permission_service_ids = [another_service.id]

assert_cannot ability, :show, cinstance_event

Expand Down

0 comments on commit c982bdc

Please sign in to comment.