diff options
Diffstat (limited to 'models/token_test.go')
-rw-r--r-- | models/token_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/token_test.go b/models/token_test.go index 572a5de609..23d902adbc 100644 --- a/models/token_test.go +++ b/models/token_test.go @@ -83,7 +83,7 @@ func TestGetAccessTokenBySHA(t *testing.T) { func TestListAccessTokens(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - tokens, err := ListAccessTokens(1, ListOptions{}) + tokens, err := ListAccessTokens(ListAccessTokensOptions{UserID: 1}) assert.NoError(t, err) if assert.Len(t, tokens, 2) { assert.Equal(t, int64(1), tokens[0].UID) @@ -92,14 +92,14 @@ func TestListAccessTokens(t *testing.T) { assert.Contains(t, []string{tokens[0].Name, tokens[1].Name}, "Token B") } - tokens, err = ListAccessTokens(2, ListOptions{}) + tokens, err = ListAccessTokens(ListAccessTokensOptions{UserID: 2}) assert.NoError(t, err) if assert.Len(t, tokens, 1) { assert.Equal(t, int64(2), tokens[0].UID) assert.Equal(t, "Token A", tokens[0].Name) } - tokens, err = ListAccessTokens(100, ListOptions{}) + tokens, err = ListAccessTokens(ListAccessTokensOptions{UserID: 100}) assert.NoError(t, err) assert.Empty(t, tokens) } |