This commit is contained in:
@@ -35,7 +35,7 @@ namespace raven_integration
|
||||
Util.ValidateHTTPStatusCode(a, 200);
|
||||
|
||||
((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(5);
|
||||
a.ObjectResponse["data"][3]["name"].Value<string>().Should().Be("Client user");
|
||||
a.ObjectResponse["data"][3]["name"].Value<string>().Should().Be("Customer user");
|
||||
a.ObjectResponse["data"][3]["id"].Value<int>().Should().Be(4);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace raven_integration
|
||||
//CREATE attempt with broken rules
|
||||
dynamic d = new JObject();
|
||||
d.name = Util.Uniquify("BusinessRuleNameMustBeUnique TEST WIDGET");
|
||||
d.notes="blah";
|
||||
d.notes = "blah";
|
||||
d.customFields = Util.WidgetRequiredCustomFieldsJsonString();
|
||||
d.created = DateTime.Now.ToString();
|
||||
d.dollarAmount = 1.11m;
|
||||
@@ -210,6 +210,9 @@ namespace raven_integration
|
||||
[Fact]
|
||||
public async void BusinessRuleEnumInvalidShouldError()
|
||||
{
|
||||
//Note: because of the way the flags work as powers of 2 and with the 1 being the first flag value, basically any value up to the "All" value will be valid
|
||||
//because you can make any number from 0 to all using any combination of the flags so the only thing that will fail is less than zero or greater than All
|
||||
//As of this last edit the total flags value of All for roles is 131071
|
||||
|
||||
dynamic d = new JObject();
|
||||
d.name = Util.Uniquify("BusinessRuleEnumInvalidShouldError TEST");
|
||||
@@ -218,7 +221,10 @@ namespace raven_integration
|
||||
//NO END DATE ERRROR
|
||||
d.dollarAmount = 1.11m;
|
||||
d.active = true;
|
||||
d.roles = 99999;//<---BAD ROLE VALUE
|
||||
d.roles = -1;//<---BAD ROLE VALUE
|
||||
d.Notes = "blah";
|
||||
d.customFields = Util.WidgetRequiredCustomFieldsJsonString();
|
||||
|
||||
|
||||
//create via inventory full test user
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
@@ -226,7 +232,7 @@ namespace raven_integration
|
||||
|
||||
//2002 in-valid expected
|
||||
Util.ValidateErrorCodeResponse(a, 2200, 400);
|
||||
Util.ShouldContainValidationError(a, "Roles", "2203");
|
||||
Util.ShouldContainValidationError(a, "Notes", "2201");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user