diff options
Diffstat (limited to 'integrations/api_token_test.go')
-rw-r--r-- | integrations/api_token_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/integrations/api_token_test.go b/integrations/api_token_test.go index aca4768503..17e8fb5e25 100644 --- a/integrations/api_token_test.go +++ b/integrations/api_token_test.go @@ -17,7 +17,7 @@ import ( // TestAPICreateAndDeleteToken tests that token that was just created can be deleted func TestAPICreateAndDeleteToken(t *testing.T) { defer prepareTestEnv(t)() - user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}).(*user_model.User) + user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) req := NewRequestWithJSON(t, "POST", "/api/v1/users/user1/tokens", map[string]string{ "name": "test-key-1", @@ -57,7 +57,7 @@ func TestAPICreateAndDeleteToken(t *testing.T) { // TestAPIDeleteMissingToken ensures that error is thrown when token not found func TestAPIDeleteMissingToken(t *testing.T) { defer prepareTestEnv(t)() - user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}).(*user_model.User) + user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) req := NewRequestf(t, "DELETE", "/api/v1/users/user1/tokens/%d", unittest.NonexistentID) req = AddBasicAuthHeader(req, user.Name) |