This commit is contained in:
@@ -58,29 +58,23 @@ namespace raven_integration
|
||||
d["public"] = false;
|
||||
d.name = Util.Uniquify("Put - Test DataFilter (privatized)");
|
||||
d.concurrencyToken = a.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
|
||||
ApiResponse PUTTestResponse = await Util.PutAsync("DataFilter/" + Id.ToString(), await Util.GetTokenAsync("BizAdminFull"), d.ToString());
|
||||
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
|
||||
a = await Util.PutAsync("DataFilter/" + Id.ToString(), await Util.GetTokenAsync("BizAdminFull"), d.ToString());
|
||||
Util.ValidateHTTPStatusCode(a, 200);
|
||||
|
||||
// // //check PUT worked
|
||||
// // ApiResponse checkPUTWorked = await Util.GetAsync("Tag/" + tagId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
// // Util.ValidateNoErrorInResponse(checkPUTWorked);
|
||||
// // checkPUTWorked.ObjectResponse["data"]["name"].Value<string>().Should().Be(d.name.ToString().ToLowerInvariant().Replace(" ", "-"));
|
||||
// // uint concurrencyToken = PUTTestResponse.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
|
||||
//check PUT worked
|
||||
a = await Util.GetAsync("DataFilter/" + Id.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
Util.ValidateNoErrorInResponse(a);
|
||||
a.ObjectResponse["data"]["name"].Value<string>().Should().Be(d.name.ToString());
|
||||
|
||||
// // //PATCH
|
||||
// // var newName = Util.Uniquify("PatchUpdate");
|
||||
// // string patchJson = "[{\"value\": \"" + newName + "\",\"path\": \"/name\",\"op\": \"replace\"}]";
|
||||
// // ApiResponse PATCHTestResponse = await Util.PatchAsync("Tag/" + tagId.ToString() + "/" + concurrencyToken.ToString(), await Util.GetTokenAsync("BizAdminFull"), patchJson);
|
||||
// // Util.ValidateHTTPStatusCode(PATCHTestResponse, 200);
|
||||
|
||||
// // //check PATCH worked
|
||||
// // ApiResponse checkPATCHWorked = await Util.GetAsync("Tag/" + tagId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
// // Util.ValidateNoErrorInResponse(checkPATCHWorked);
|
||||
// // checkPATCHWorked.ObjectResponse["data"]["name"].Value<string>().Should().Be(newName.ToLowerInvariant().Replace(" ", "-"));
|
||||
//FETCH DISALLOWED
|
||||
//Get as alternate user should fail for private filter
|
||||
a = await Util.GetAsync("DataFilter/" + Id.ToString(), await Util.GetTokenAsync("SubContractorLimited"));
|
||||
Util.ValidateResponseNotFound(a);
|
||||
|
||||
// // // //DELETE
|
||||
// // ApiResponse DELETETestResponse = await Util.DeleteAsync("Tag/" + tagId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
// // Util.ValidateHTTPStatusCode(DELETETestResponse, 204);
|
||||
// //DELETE
|
||||
ApiResponse DELETETestResponse = await Util.DeleteAsync("DataFilter/" + Id.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
Util.ValidateHTTPStatusCode(DELETETestResponse, 204);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user