1
0
forked from baron/baron-sso

test(backend): add unit tests for user group management and fix interface inconsistencies

This commit is contained in:
2026-02-13 14:55:45 +09:00
parent 7f8d52ac3f
commit 92f084fd59
7 changed files with 408 additions and 1 deletions

View File

@@ -54,6 +54,14 @@ func (m *MockKetoService) ListRelations(ctx context.Context, namespace, object,
return args.Get(0).([]RelationTuple), args.Error(1)
}
func (m *MockKetoService) ListObjects(ctx context.Context, namespace, relation, subject string) ([]string, error) {
args := m.Called(ctx, namespace, relation, subject)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).([]string), args.Error(1)
}
// --- Test Helpers ---
type hydraRoundTripperFunc func(*http.Request) (*http.Response, error)