Remove unused ScopesCover function

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
Aurélien Sibiril
2026-04-10 10:12:44 +02:00
parent 1def3a4136
commit cc6d271f10
2 changed files with 0 additions and 42 deletions

View File

@@ -72,30 +72,6 @@ func TestUnionScopes(t *testing.T) {
}
}
func TestScopesCover(t *testing.T) {
t.Parallel()
cases := []struct {
name string
granted []string
required []string
want bool
}{
{"empty required is covered", []string{"a"}, []string{}, true},
{"empty granted does not cover non-empty required", []string{}, []string{"a"}, false},
{"exact match", []string{"a", "b"}, []string{"a", "b"}, true},
{"granted superset", []string{"a", "b", "c"}, []string{"a", "b"}, true},
{"missing one", []string{"a"}, []string{"a", "b"}, false},
{"reordered match", []string{"b", "a"}, []string{"a", "b"}, true},
}
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
t.Parallel()
assert.Equal(t, c.want, ScopesCover(c.granted, c.required))
})
}
}
func TestFormatScopeString(t *testing.T) {
t.Parallel()