This commit is contained in:
2026-02-25 19:41:30 -08:00
parent 6750d54641
commit 94804aadd9

View File

@@ -92,9 +92,22 @@ namespace raven_integration
{
ApiResponse a = await Util.DeleteAsync("User/1", await Util.GetTokenAsync("superuser", "l3tm3in"));
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>
/// Test not found
@@ -168,6 +181,7 @@ namespace raven_integration
d.name = Util.Uniquify("PutPasswordShouldWork");
d.active = true;
d.allowLogin=true;
d.login = Util.Uniquify("LOGIN");
d.password = Util.Uniquify("PASSWORD");
d.roles = 0;//norole
@@ -175,7 +189,6 @@ namespace raven_integration
d.userType = 2;// not service type user
//Required by form custom rules
d.notes = "notes";
d.customFields = Util.UserRequiredCustomFieldsJsonString();
ApiResponse a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), d.ToString());
Util.ValidateDataReturnResponseOk(a);