fix empty scopes return

Signed-off-by: ye.sijun <junnplus@gmail.com>
This commit is contained in:
ye.sijun
2022-01-20 15:08:35 +08:00
parent 753f95e23f
commit 936faf9c98
2 changed files with 10 additions and 1 deletions

View File

@@ -63,6 +63,11 @@ func TestGetTokenScopes(t *testing.T) {
commonScopes []string
expected []string
}{
{
scopesInCtx: []string{},
commonScopes: []string{},
expected: []string{},
},
{
scopesInCtx: []string{},
commonScopes: []string{"repository:foo/bar:pull"},