Skip to content

Commit

Permalink
update mock assert func
Browse files Browse the repository at this point in the history
  • Loading branch information
talaharoni committed Apr 4, 2024
1 parent b104e08 commit 0ba6f33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions descope/tests/mocks/mgmt/managementmock.go
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ type MockAuthz struct {
WhatCanTargetAccessResponse []*descope.AuthzRelation
WhatCanTargetAccessError error

WhatCanTargetAccessWithRelationAssert func(target string)
WhatCanTargetAccessWithRelationAssert func(target, relationDefinition, namespace string)
WhatCanTargetAccessWithRelationResponse []*descope.AuthzRelation
WhatCanTargetAccessWithRelationError error

Expand Down Expand Up @@ -1390,7 +1390,7 @@ func (m *MockAuthz) WhatCanTargetAccess(_ context.Context, target string) ([]*de

func (m *MockAuthz) WhatCanTargetAccessWithRelation(_ context.Context, target, relationDefinition, namespace string) ([]*descope.AuthzRelation, error) {
if m.WhatCanTargetAccessWithRelationAssert != nil {
m.WhatCanTargetAccessWithRelationAssert(target)
m.WhatCanTargetAccessWithRelationAssert(target, relationDefinition, namespace)
}
return m.WhatCanTargetAccessWithRelationResponse, m.WhatCanTargetAccessWithRelationError
}
Expand Down

0 comments on commit 0ba6f33

Please sign in to comment.