This commit is contained in:
@@ -30,28 +30,24 @@ namespace raven_integration
|
||||
//template, simple test, nothing fancy
|
||||
dynamic dTemplateArray = new JArray();
|
||||
dynamic df = new JObject();
|
||||
df.fld = "useremployeenumber";
|
||||
df.fld = "useremployeenumber";
|
||||
dTemplateArray.Add(df);
|
||||
d.Template = dTemplateArray.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
//replace the User template at the server
|
||||
ApiResponse a = await Util.PostAsync("PickList/Template", await Util.GetTokenAsync("BizAdminFull"), d.ToString(Newtonsoft.Json.Formatting.None));
|
||||
Util.ValidateHTTPStatusCode(a, 204);
|
||||
// Util.ValidateDataReturnResponseOk(a);
|
||||
Util.ValidateHTTPStatusCode(a, 204);
|
||||
|
||||
|
||||
|
||||
// //RETRIEVE
|
||||
// //Get one
|
||||
// a = await Util.GetAsync("DataListView/" + Id.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
// Util.ValidateDataReturnResponseOk(a);
|
||||
// a.ObjectResponse["data"]["name"].Value<string>().Should().StartWith("Test DataListView");
|
||||
|
||||
// //Get as alternate user should work for public filter
|
||||
// a = await Util.GetAsync("DataListView/" + Id.ToString(), await Util.GetTokenAsync("SubContractorLimited"));
|
||||
// Util.ValidateDataReturnResponseOk(a);
|
||||
// a.ObjectResponse["data"]["name"].Value<string>().Should().StartWith("Test DataListView");
|
||||
|
||||
//RETRIEVE
|
||||
//Get one
|
||||
a = await Util.GetAsync("PickList/Template/3/", await Util.GetTokenAsync("BizAdminFull"));
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
//assert contains ONE record ONLY and it's the one we set
|
||||
var templateArray=JArray.Parse(a.ObjectResponse["data"]["template"].Value<string>());
|
||||
templateArray.Count.Should().Be(1);
|
||||
templateArray[0]["fld"].Value<string>().Should().Be("useremployeenumber");;
|
||||
|
||||
|
||||
// //UPDATE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user