test(auth): add permission tests for files and settings api
This commit is contained in:
parent
cff87bdddd
commit
d2d269171d
5 changed files with 404 additions and 317 deletions
|
@ -212,3 +212,11 @@ func assertDownloadOK(t *testing.T, filePath, content, addr string, token *http.
|
|||
|
||||
return true
|
||||
}
|
||||
|
||||
func assertResp(t *testing.T, resp *http.Response, errs []error, expectedCode int, desc string) {
|
||||
if len(errs) > 0 {
|
||||
t.Fatal(errs)
|
||||
} else if resp.StatusCode != expectedCode {
|
||||
t.Fatal(desc, resp.StatusCode, expectedCode)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue