mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
fix scenario test, createdAt and updatedAt are now contained in API responses
This commit is contained in:
parent
e1b9311686
commit
70a483546d
1 changed files with 13 additions and 3 deletions
|
@ -500,7 +500,12 @@ func TestAddUserToScenario(t *testing.T) {
|
|||
assert.Equalf(t, 200, code, "Response body: \n%v\n", resp)
|
||||
|
||||
// Compare resp to userB
|
||||
err = helper.CompareResponse(resp, helper.KeyModels{"user": helper.UserB})
|
||||
userB := UserRequest{
|
||||
Username: helper.UserB.Username,
|
||||
Mail: helper.UserB.Mail,
|
||||
Role: helper.UserB.Role,
|
||||
}
|
||||
err = helper.CompareResponse(resp, helper.KeyModels{"user": userB})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Count AGAIN the number of all the users returned for newScenario
|
||||
|
@ -663,8 +668,13 @@ func TestRemoveUserFromScenario(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
assert.Equalf(t, 200, code, "Response body: \n%v\n", resp)
|
||||
|
||||
// Compare DELETE's response with UserB
|
||||
err = helper.CompareResponse(resp, helper.KeyModels{"user": helper.UserC})
|
||||
// Compare DELETE's response with UserC's data
|
||||
userC := UserRequest{
|
||||
Username: helper.UserC.Username,
|
||||
Mail: helper.UserC.Mail,
|
||||
Role: helper.UserC.Role,
|
||||
}
|
||||
err = helper.CompareResponse(resp, helper.KeyModels{"user": userC})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Count AGAIN the number of all the users returned for newScenario
|
||||
|
|
Loading…
Add table
Reference in a new issue