This commit is contained in:
2018-12-03 19:12:35 +00:00
parent 1a90226002
commit 51941a958e
10 changed files with 270 additions and 65 deletions

View File

@@ -11,27 +11,27 @@ namespace raven_integration
{
/// <summary>
/// Test business rule should be active on new
/// </summary>
[Fact]
public async void BusinessRuleNewShouldBeActiveShouldWork()
{
//CREATE attempt with broken rules
dynamic d = new JObject();
d.name = Util.Uniquify("ServerShouldDisAllowOwnerOnlyRightsUserToDeleteNonOwned TEST WIDGET");
d.created = DateTime.Now.ToString();
d.dollarAmount = 1.11m;
d.active = false;//<--- BROKEN RULE new widget must be active = true!!
d.roles = 0;
// /// <summary>
// /// Test business rule should be active on new
// /// </summary>
// [Fact]
// public async void BusinessRuleNewShouldBeActiveShouldWork()
// {
// //CREATE attempt with broken rules
// dynamic d = new JObject();
// d.name = Util.Uniquify("ServerShouldDisAllowOwnerOnlyRightsUserToDeleteNonOwned TEST WIDGET");
// d.created = DateTime.Now.ToString();
// d.dollarAmount = 1.11m;
// d.active = false;//<--- BROKEN RULE new widget must be active = true!!
// d.roles = 0;
//create via inventory full test user
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
// //create via inventory full test user
// ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
Util.ValidateErrorCodeResponse(a, 2200, 400);
Util.ShouldContainValidationError(a, "Active", "InvalidValue");
// Util.ValidateErrorCodeResponse(a, 2200, 400);
// Util.ShouldContainValidationError(a, "Active", "InvalidValue");
}
// }