summaryrefslogtreecommitdiffstats
path: root/api4/user_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/user_test.go')
-rw-r--r--api4/user_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/api4/user_test.go b/api4/user_test.go
index fb9222d8f..7b103d23b 100644
--- a/api4/user_test.go
+++ b/api4/user_test.go
@@ -2450,6 +2450,23 @@ func TestGetUserAccessToken(t *testing.T) {
if len(rtokens) != 2 {
t.Fatal("should have 2 tokens")
}
+
+ _, resp = Client.GetUserAccessTokens(0,100)
+ CheckForbiddenStatus(t, resp)
+
+ rtokens, resp = AdminClient.GetUserAccessTokens(1,1)
+ CheckNoError(t, resp)
+
+ if len(rtokens) != 1 {
+ t.Fatal("should have 1 token")
+ }
+
+ rtokens, resp = AdminClient.GetUserAccessTokens(0,2)
+ CheckNoError(t, resp)
+
+ if len(rtokens) != 2 {
+ t.Fatal("should have 2 tokens")
+ }
}
func TestRevokeUserAccessToken(t *testing.T) {