This commit is contained in:
2019-05-20 22:07:36 +00:00
parent d344d57b2d
commit 49702e2d7c
6 changed files with 20 additions and 25 deletions

View File

@@ -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");

View File

@@ -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");