4648
This commit is contained in:
@@ -92,9 +92,22 @@ namespace raven_integration
|
|||||||
{
|
{
|
||||||
ApiResponse a = await Util.DeleteAsync("User/1", await Util.GetTokenAsync("superuser", "l3tm3in"));
|
ApiResponse a = await Util.DeleteAsync("User/1", await Util.GetTokenAsync("superuser", "l3tm3in"));
|
||||||
Util.ValidateErrorCodeResponse(a, 2200, 400);
|
Util.ValidateErrorCodeResponse(a, 2200, 400);
|
||||||
a.ObjectResponse["error"]["details"][0]["message"].Value<string>().Should().Contain("LT:ErrorDBForeignKeyViolation");
|
a.ObjectResponse["error"]["details"][0]["target"].Value<string>().Should().Be("generalerror");
|
||||||
|
a.ObjectResponse["error"]["details"][0]["error"].Value<string>().Should().Be("2208");//referential integrity error
|
||||||
}
|
}
|
||||||
|
// {{
|
||||||
|
// "error": {
|
||||||
|
// "code": "2200",
|
||||||
|
// "details": [
|
||||||
|
// {
|
||||||
|
// "message": "Memo",
|
||||||
|
// "target": "generalerror",
|
||||||
|
// "error": "2208"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "message": "ErrorAPI2200"
|
||||||
|
// }
|
||||||
|
// }}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test not found
|
/// Test not found
|
||||||
@@ -168,6 +181,7 @@ namespace raven_integration
|
|||||||
d.name = Util.Uniquify("PutPasswordShouldWork");
|
d.name = Util.Uniquify("PutPasswordShouldWork");
|
||||||
|
|
||||||
d.active = true;
|
d.active = true;
|
||||||
|
d.allowLogin=true;
|
||||||
d.login = Util.Uniquify("LOGIN");
|
d.login = Util.Uniquify("LOGIN");
|
||||||
d.password = Util.Uniquify("PASSWORD");
|
d.password = Util.Uniquify("PASSWORD");
|
||||||
d.roles = 0;//norole
|
d.roles = 0;//norole
|
||||||
@@ -175,7 +189,6 @@ namespace raven_integration
|
|||||||
d.userType = 2;// not service type user
|
d.userType = 2;// not service type user
|
||||||
//Required by form custom rules
|
//Required by form custom rules
|
||||||
d.notes = "notes";
|
d.notes = "notes";
|
||||||
d.customFields = Util.UserRequiredCustomFieldsJsonString();
|
|
||||||
|
|
||||||
ApiResponse a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), d.ToString());
|
ApiResponse a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), d.ToString());
|
||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
|||||||
Reference in New Issue
Block a user