diff --git a/api/handler/v1beta1/grant_test.go b/api/handler/v1beta1/grant_test.go index eff886f75..7f8d2dc29 100644 --- a/api/handler/v1beta1/grant_test.go +++ b/api/handler/v1beta1/grant_test.go @@ -271,9 +271,7 @@ func (s *GrpcHandlersSuite) TestListUserRoles() { } expectedUser := "test-user" s.grantService.EXPECT(). - ListUserRoles(mock.AnythingOfType("*context.valueCtx"), domain.ListGrantsFilter{ - Owner: "test-user", - }). + ListUserRoles(mock.AnythingOfType("*context.valueCtx"), "test-user"). Return(expectedResponse.Roles, nil).Once() ctx := context.WithValue(context.Background(), authEmailTestContextKey{}, expectedUser) diff --git a/core/grant/service_test.go b/core/grant/service_test.go index 593a5b6ba..899b40677 100644 --- a/core/grant/service_test.go +++ b/core/grant/service_test.go @@ -1016,12 +1016,12 @@ func (s *ServiceTestSuite) TestGetGrantsTotalCount() { }) } -func (s *ServiceTestSuite) TestListUserRolesCount() { +func (s *ServiceTestSuite) TestListUserRoles() { s.Run("should return error if got error from repository", func() { s.setup() expectedError := errors.New("repository error") s.mockRepository.EXPECT(). - ListUserRoles(mock.AnythingOfType("*context.emptyCtx"), domain.ListGrantsFilter{}). + ListUserRoles(mock.AnythingOfType("*context.emptyCtx"), "user"). Return(nil, expectedError).Once() actualCount, actualError := s.service.ListUserRoles(context.Background(), "user")