This commit is contained in:
@@ -44,10 +44,33 @@ namespace raven_integration
|
||||
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");;
|
||||
|
||||
var templateArray = JArray.Parse(a.ObjectResponse["data"]["template"].Value<string>());
|
||||
templateArray.Count.Should().Be(1);
|
||||
templateArray[0]["fld"].Value<string>().Should().Be("useremployeenumber"); ;
|
||||
|
||||
|
||||
// RESET TO DEFAULT
|
||||
a = await Util.DeleteAsync("PickList/Template/3/", await Util.GetTokenAsync("BizAdminFull"));
|
||||
Util.ValidateHTTPStatusCode(a, 204);
|
||||
|
||||
//RETRIEVE (Confirm it's back to default)
|
||||
//Get one
|
||||
a = await Util.GetAsync("PickList/Template/3/", await Util.GetTokenAsync("BizAdminFull"));
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
//assert contains default template record ONLY and it's the one we set
|
||||
templateArray = JArray.Parse(a.ObjectResponse["data"]["template"].Value<string>());
|
||||
templateArray.Count.Should().Be(3);
|
||||
templateArray[0]["fld"].Value<string>().Should().Be("username"); ;
|
||||
|
||||
|
||||
//Now test error conditions....
|
||||
|
||||
//bad field name
|
||||
//no such list
|
||||
//no rights? (might need to make some changes at server, right now maybe anyone can modify template (bad))
|
||||
//empty template
|
||||
//malformed template bad json?
|
||||
|
||||
|
||||
// //UPDATE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user