diff --git a/PickList/PickListAllTests.cs b/PickList/PickListAllTests.cs index 3045d76..028a60a 100644 --- a/PickList/PickListAllTests.cs +++ b/PickList/PickListAllTests.cs @@ -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()); - templateArray.Count.Should().Be(1); - templateArray[0]["fld"].Value().Should().Be("useremployeenumber");; - + var templateArray = JArray.Parse(a.ObjectResponse["data"]["template"].Value()); + templateArray.Count.Should().Be(1); + templateArray[0]["fld"].Value().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()); + templateArray.Count.Should().Be(3); + templateArray[0]["fld"].Value().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