Commit b515b737 authored by Alexis POYEN's avatar Alexis POYEN
Browse files

Fix : test

parent ba832151
Pipeline #5150 passed with stages
in 3 minutes and 25 seconds
......@@ -64,14 +64,14 @@ func AdminTests(t *testing.T) {
xsrfHeader := tester.Header{Key: "XSRF-TOKEN", Value: token.XSRFToken}
// Create a Client
do("POST", apiAdminUsers, xsrfHeader, `{"login":"UserTest","password": "password","role":"CLIENT"}`, 200, `{"id":7,"idOAuth":"","login":"UserTest","role":"CLIENT"`)
do("POST", apiAdminUsers, xsrfHeader, `{"login":"UserTest","password": "password","role":"CLIENT"}`, 200, `{"id":9,"idOAuth":"","login":"UserTest","role":"CLIENT"`)
// Create a Banker
do("POST", apiAdminUsers, xsrfHeader, `{"login":"BankerTest","password": "password","role":"BANKER"}`, 200, `{"id":8,"idOAuth":"","login":"BankerTest","role":"BANKER"`)
do("POST", apiAdminUsers, xsrfHeader, `{"login":"BankerTest","password": "password","role":"BANKER"}`, 200, `{"id":10,"idOAuth":"","login":"BankerTest","role":"BANKER"`)
// Get all users
do("GET", apiAdminUsers, xsrfHeader, ``, 200, `[{"id":1,"idOAuth":"","login":"Dupond"`)
// Delete created users
do("DELETE", "/api/admin/users/7", xsrfHeader, ``, 200, ``)
do("DELETE", "/api/admin/users/8", xsrfHeader, ``, 200, ``)
do("DELETE", "/api/admin/users/9", xsrfHeader, ``, 200, ``)
do("DELETE", "/api/admin/users/10", xsrfHeader, ``, 200, ``)
}
// Do an OAuth2 login with an known admin
do("GET", "/OAuth2Login", noH, "", 200, "<!DOCTYPE html>")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment