fix a bug in scenario testing: try to remove user that does not exist

This commit is contained in:
Sonja Happ 2019-09-11 12:38:41 +02:00
parent 387c922059
commit f42c962a97

View file

@ -484,7 +484,7 @@ func TestRemoveUserFromScenario(t *testing.T) {
// Try to remove a user that does not exist in DB // Try to remove a user that does not exist in DB
// This should fail with not found 404 status code // This should fail with not found 404 status code
code, resp, err = helper.TestEndpoint(router, token, code, resp, err = helper.TestEndpoint(router, token,
fmt.Sprintf("/api/scenarios/%v/user?username=User_C", newScenarioID), "DELETE", nil) fmt.Sprintf("/api/scenarios/%v/user?username=User_D", newScenarioID), "DELETE", nil)
assert.NoError(t, err) assert.NoError(t, err)
assert.Equalf(t, 404, code, "Response body: \n%v\n", resp) assert.Equalf(t, 404, code, "Response body: \n%v\n", resp)