(t *testing.T)
| 101 | } |
| 102 | |
| 103 | func TestCustomScope(t *testing.T) { |
| 104 | scope := "whatever:foo/bar:pull" |
| 105 | ctx := WithScope(context.Background(), scope) |
| 106 | ctx = ContextWithAppendPullRepositoryScope(ctx, "foo/bar") |
| 107 | |
| 108 | scopes := GetTokenScopes(ctx, []string{}) |
| 109 | assert.Equal(t, []string{"repository:foo/bar:pull", scope}, scopes) |
| 110 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…