test: add permission tests - users APIs

This commit is contained in:
hexxa 2022-02-16 17:59:04 +08:00 committed by Hexxa
parent 7473d5ce5d
commit 980bceb090
2 changed files with 265 additions and 0 deletions

View file

@ -171,3 +171,9 @@ func (cl *SingleUserClient) SetPreferences(prefers *userstore.Preferences, token
AddCookie(token).
End()
}
func (cl *SingleUserClient) IsAuthed(token *http.Cookie) (*http.Response, string, []error) {
return cl.r.Get(cl.url("/v1/users/isauthed")).
AddCookie(token).
End()
}