This commit is contained in:
@@ -11,7 +11,7 @@ namespace raven_integration
|
||||
|
||||
public class WidgetLists
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -26,11 +26,11 @@ namespace raven_integration
|
||||
d.active = true;
|
||||
d.roles = 0;
|
||||
|
||||
ApiResponse r1 = await Util.PostAsync("Widget", await Util.GetTokenAsync( "manager", "l3tm3in"), d.ToString());
|
||||
ApiResponse r1 = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), d.ToString());
|
||||
Util.ValidateDataReturnResponseOk(r1);
|
||||
|
||||
//Get all
|
||||
ApiResponse a = await Util.GetAsync("Widget/picklist?Offset=2&Limit=3&q=%25of%25", await Util.GetTokenAsync( "InventoryLimited"));
|
||||
ApiResponse a = await Util.GetAsync("Widget/picklist?Offset=2&Limit=3&q=%25of%25", await Util.GetTokenAsync("InventoryLimited"));
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
Util.ValidateHTTPStatusCode(a, 200);
|
||||
((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(0);
|
||||
@@ -44,7 +44,7 @@ namespace raven_integration
|
||||
public async void PagingShouldWorkAsExpected()
|
||||
{
|
||||
//Get all
|
||||
ApiResponse a = await Util.GetAsync("Widget/listwidgets?Offset=2&Limit=3", await Util.GetTokenAsync( "manager", "l3tm3in"));
|
||||
ApiResponse a = await Util.GetAsync("Widget/listwidgets?Offset=2&Limit=3", await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
Util.ValidateHTTPStatusCode(a, 200);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace raven_integration
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Fact]
|
||||
@@ -99,6 +99,7 @@ namespace raven_integration
|
||||
|
||||
|
||||
|
||||
|
||||
//==================================================
|
||||
|
||||
}//eoc
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user