4648
This commit is contained in:
@@ -28,7 +28,7 @@ namespace raven_integration
|
||||
[Fact]
|
||||
public async Task ServerShouldNotAllowReadUnauthorizedAccess()
|
||||
{
|
||||
ApiResponse a = await Util.GetAsync("widget/listwidgets", await Util.GetTokenAsync( "OpsAdminFull"));
|
||||
ApiResponse a = await Util.GetAsync("widget/listwidgets", await Util.GetTokenAsync( "OpsAdmin"));
|
||||
//2004 unauthorized
|
||||
Util.ValidateErrorCodeResponse(a, 2004, 403);
|
||||
}
|
||||
@@ -49,8 +49,8 @@ namespace raven_integration
|
||||
d.active = true;
|
||||
d.usertype = 1;
|
||||
|
||||
//BizAdminLimited user should not be able to create a widget, only read them
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync( "BizAdminLimited"), d.ToString());
|
||||
//BizAdminRestricted user should not be able to create a widget, only read them
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync( "BizAdminRestricted"), d.ToString());
|
||||
|
||||
//2004 unauthorized
|
||||
Util.ValidateErrorCodeResponse(a, 2004, 403);
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace raven_integration
|
||||
// d.usertype = 1;
|
||||
|
||||
// //create via inventory full test user
|
||||
// ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
// ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
|
||||
// Util.ValidateErrorCodeResponse(a, 2200, 400);
|
||||
// Util.ShouldContainValidationError(a, "Active", "2203");
|
||||
@@ -53,11 +53,11 @@ namespace raven_integration
|
||||
d.usertype = 1;
|
||||
|
||||
//create via inventory full test user
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
|
||||
//Now try to create again with same name
|
||||
a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
|
||||
//2002 in-valid expected
|
||||
Util.ValidateErrorCodeResponse(a, 2200, 400);
|
||||
@@ -82,7 +82,7 @@ namespace raven_integration
|
||||
d.usertype = 1;
|
||||
|
||||
//create via inventory full test user
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
|
||||
|
||||
//2002 in-valid expected
|
||||
@@ -108,7 +108,7 @@ namespace raven_integration
|
||||
d.usertype = 1;
|
||||
|
||||
//create via inventory full test user
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
|
||||
|
||||
//2002 in-valid expected
|
||||
@@ -137,7 +137,7 @@ namespace raven_integration
|
||||
d.usertype = 1;
|
||||
|
||||
//create via inventory full test user
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
|
||||
|
||||
//2002 in-valid expected
|
||||
@@ -165,7 +165,7 @@ namespace raven_integration
|
||||
d.usertype = 1;
|
||||
|
||||
//create via inventory full test user
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
|
||||
|
||||
//2002 in-valid expected
|
||||
@@ -193,7 +193,7 @@ namespace raven_integration
|
||||
d.usertype = 1;
|
||||
|
||||
//create via inventory full test user
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
|
||||
|
||||
//2002 in-valid expected
|
||||
@@ -224,7 +224,7 @@ namespace raven_integration
|
||||
|
||||
|
||||
//create via inventory full test user
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), d.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("Inventory"), d.ToString());
|
||||
|
||||
|
||||
//2002 in-valid expected
|
||||
|
||||
Reference in New Issue
Block a user