This commit is contained in:
@@ -75,7 +75,7 @@ namespace raven_integration
|
||||
|
||||
//update w2id
|
||||
w.name = Util.Uniquify("UPDATED VIA PUT EVENTLOG TEST WIDGET");
|
||||
w.OwnerId = 1;
|
||||
w.UserId = 1;
|
||||
w.concurrencyToken = r2.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
|
||||
ApiResponse PUTTestResponse = await Util.PutAsync("Widget/" + w2Id.ToString(), await Util.GetTokenAsync("InventoryFull"), w.ToString());
|
||||
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace raven_integration
|
||||
var Password = Util.Uniquify("PASSWORD");
|
||||
dynamic DUSER = new JObject();
|
||||
DUSER.name = Util.Uniquify("LocaleUpdateSubsetTestUser");
|
||||
DUSER.ownerId = 1L;
|
||||
|
||||
DUSER.active = true;
|
||||
DUSER.login = Login;
|
||||
DUSER.password = Password;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace raven_integration
|
||||
D.name = Util.Uniquify("Search NAME DOGS simple Test User");
|
||||
D.customFields = Util.GenerateCustomFieldsJsonString("Meh1");
|
||||
D.notes = "This user has the match in it's name";
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -52,7 +52,7 @@ namespace raven_integration
|
||||
D.name = Util.Uniquify("Search NOTES Test User");
|
||||
D.customFields = Util.GenerateCustomFieldsJsonString("Meh1");
|
||||
D.notes = "This user has the match simple dogs in its notes";
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -188,7 +188,7 @@ namespace raven_integration
|
||||
D = new JObject();
|
||||
D.name = Util.Uniquify("Wildcard startswith search NAME happy goose Test User");
|
||||
D.notes = "This user has the match in it's name";
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -251,7 +251,7 @@ namespace raven_integration
|
||||
D = new JObject();
|
||||
D.name = Util.Uniquify("Wildcard endswith search NAME goose exact Test User");
|
||||
D.notes = "This user has the match in it's name";
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -316,7 +316,7 @@ namespace raven_integration
|
||||
D = new JObject();
|
||||
D.name = Util.Uniquify("Wildcard contains search NAME goose elcastro Test User");
|
||||
D.notes = "This user has the match in it's name";
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -414,7 +414,7 @@ namespace raven_integration
|
||||
D = new JObject();
|
||||
D.name = Util.Uniquify("Wildcard contains search NAME elementary aardvark Test User");
|
||||
D.notes = "This user has the match in it's name but no tag match";
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace raven_integration
|
||||
//CREATE
|
||||
dynamic D1 = new JObject();
|
||||
D1.name = Util.Uniquify("First Test User");
|
||||
D1.ownerId = 1L;
|
||||
|
||||
D1.active = true;
|
||||
D1.login = Util.Uniquify("LOGIN");
|
||||
D1.password = Util.Uniquify("PASSWORD");
|
||||
@@ -34,7 +34,7 @@ namespace raven_integration
|
||||
|
||||
dynamic D2 = new JObject();
|
||||
D2.name = Util.Uniquify("Second Test User");
|
||||
D2.ownerId = 1L;
|
||||
|
||||
D2.active = true;
|
||||
D2.login = Util.Uniquify("LOGIN");
|
||||
D2.password = Util.Uniquify("PASSWORD");
|
||||
@@ -60,8 +60,7 @@ namespace raven_integration
|
||||
//PUT
|
||||
|
||||
//update w2id
|
||||
D2.name = Util.Uniquify("UPDATED VIA PUT SECOND TEST User");
|
||||
D2.OwnerId = 1;
|
||||
D2.name = Util.Uniquify("UPDATED VIA PUT SECOND TEST User");
|
||||
D2.concurrencyToken = R2.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
|
||||
ApiResponse PUTTestResponse = await Util.PutAsync("User/" + d2Id.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"), D2.ToString());
|
||||
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
|
||||
@@ -135,7 +134,7 @@ namespace raven_integration
|
||||
//CREATE
|
||||
dynamic D = new JObject();
|
||||
D.name = Util.Uniquify("PutConcurrencyViolationShouldFail");
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -168,7 +167,7 @@ namespace raven_integration
|
||||
//CREATE
|
||||
dynamic D = new JObject();
|
||||
D.name = Util.Uniquify("PatchConcurrencyViolationShouldFail");
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -200,7 +199,7 @@ namespace raven_integration
|
||||
//CREATE
|
||||
dynamic D = new JObject();
|
||||
D.name = Util.Uniquify("DisallowedPatchAttemptsShouldFail");
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -219,11 +218,7 @@ namespace raven_integration
|
||||
ApiResponse PATCHTestResponse = await Util.PatchAsync("User/" + w2Id.ToString() + "/" + (OriginalConcurrencyToken - 1).ToString(), await Util.GetTokenAsync("manager", "l3tm3in"), patchJson);
|
||||
Util.ValidateErrorCodeResponse(PATCHTestResponse, 2200, 400);
|
||||
|
||||
//PATCH attempt on OwnerId
|
||||
patchJson = "[{\"value\": \"0\",\"path\": \"/ownerid\",\"op\": \"replace\"}]";
|
||||
PATCHTestResponse = await Util.PatchAsync("User/" + w2Id.ToString() + "/" + (OriginalConcurrencyToken - 1).ToString(), await Util.GetTokenAsync("manager", "l3tm3in"), patchJson);
|
||||
Util.ValidateErrorCodeResponse(PATCHTestResponse, 2200, 400);
|
||||
|
||||
|
||||
//PATCH attempt add field
|
||||
patchJson = "[{\"value\": \"0\",\"path\": \"/bogus\",\"op\": \"add\"}]";
|
||||
PATCHTestResponse = await Util.PatchAsync("User/" + w2Id.ToString() + "/" + (OriginalConcurrencyToken - 1).ToString(), await Util.GetTokenAsync("manager", "l3tm3in"), patchJson);
|
||||
@@ -245,7 +240,7 @@ namespace raven_integration
|
||||
//CREATE
|
||||
dynamic D = new JObject();
|
||||
D.name = Util.Uniquify("PatchPasswordShouldWork");
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
@@ -290,7 +285,7 @@ namespace raven_integration
|
||||
//CREATE
|
||||
dynamic D = new JObject();
|
||||
D.name = Util.Uniquify("PutPasswordShouldWork");
|
||||
D.ownerId = 1L;
|
||||
|
||||
D.active = true;
|
||||
D.login = Util.Uniquify("LOGIN");
|
||||
D.password = Util.Uniquify("PASSWORD");
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace raven_integration
|
||||
//CREATE a user
|
||||
dynamic D1 = new JObject();
|
||||
D1.name = Util.Uniquify("Test UserOptions User");
|
||||
D1.ownerId = 1L;
|
||||
|
||||
D1.active = true;
|
||||
D1.login = Util.Uniquify("LOGIN");
|
||||
D1.password = Util.Uniquify("PASSWORD");
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace raven_integration
|
||||
|
||||
//update w2id
|
||||
w2.name = Util.Uniquify("UPDATED VIA PUT SECOND TEST WIDGET");
|
||||
w2.OwnerId = 1;
|
||||
|
||||
w2.concurrencyToken = r2.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
|
||||
ApiResponse PUTTestResponse = await Util.PutAsync("Widget/" + w2Id.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"), w2.ToString());
|
||||
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
|
||||
@@ -201,7 +201,7 @@ namespace raven_integration
|
||||
//PUT
|
||||
|
||||
w2.name = Util.Uniquify("PutConcurrencyViolationShouldFail UPDATE VIA PUT ");
|
||||
w2.OwnerId = 1;
|
||||
|
||||
w2.concurrencyToken = OriginalConcurrencyToken - 1;//bad token
|
||||
ApiResponse PUTTestResponse = await Util.PutAsync("Widget/" + w2Id.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"), w2.ToString());
|
||||
Util.ValidateConcurrencyError(PUTTestResponse);
|
||||
|
||||
Reference in New Issue
Block a user