mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
Minor changes in modify user test
This commit is contained in:
parent
0e0936a736
commit
e0746f112f
1 changed files with 1 additions and 2 deletions
|
@ -155,7 +155,6 @@ func TestModifyAddedUserAsAdmin(t *testing.T) {
|
|||
|
||||
// modify newUser's password with INVALID password
|
||||
modRequest4 := common.Request{Password: "short"}
|
||||
newUser.Password = modRequest4.Password
|
||||
code, resp, err = common.NewTestEndpoint(router, token,
|
||||
fmt.Sprintf("/api/users/%v", maxid+1), "PUT",
|
||||
common.KeyModels{"user": modRequest4})
|
||||
|
@ -164,11 +163,11 @@ func TestModifyAddedUserAsAdmin(t *testing.T) {
|
|||
|
||||
// modify newUser's password with VALID password
|
||||
modRequest5 := common.Request{Password: "4_g00d_pw!"}
|
||||
newUser.Password = modRequest5.Password
|
||||
code, resp, err = common.NewTestEndpoint(router, token,
|
||||
fmt.Sprintf("/api/users/%v", maxid+1), "PUT",
|
||||
common.KeyModels{"user": modRequest5})
|
||||
assert.NoError(t, err)
|
||||
assert.Equalf(t, 200, code, "Response body: \n%v\n", resp)
|
||||
|
||||
// try to login as newUser with the modified username and password
|
||||
_, err = common.NewAuthenticateForTest(router,
|
||||
|
|
Loading…
Add table
Reference in a new issue