This commit is contained in:
2018-10-03 20:44:22 +00:00
parent 5a235dc77c
commit fbf05d9bac
3 changed files with 39 additions and 32 deletions

View File

@@ -112,7 +112,7 @@ namespace raven_integration
uint OriginalConcurrencyToken = a.ObjectResponse["result"]["concurrencyToken"].Value<uint>();
//Now TechFullAuthToken attempt to modify it via patch
var newName = Util.Uniquify("ServerShouldDisAllowOwnerOnlyRightsUserToPatchNonOwned - UPDATED TEST WIDGET");
var newName = Util.Uniquify("ServerShouldDisAllowOwnerOnlyRightsUserToPatchNonOwned - UPDATED TEST WIDGETB");
string patchJson = "[{\"value\": \"" + newName + "\",\"path\": \"/name\",\"op\": \"replace\"}]";
a = await Util.PatchAsync("Widget/" + Id.ToString() + "/" + OriginalConcurrencyToken.ToString(), await Util.GetTokenAsync( "TechFull"), patchJson);
//2004 unauthorized expected

View File

@@ -22,7 +22,7 @@ namespace raven_integration
public static string Uniquify(string s)
{
return s + ((DateTimeOffset)DateTime.Now).ToUnixTimeSeconds();
return s + ((DateTimeOffset)DateTime.Now).ToUnixTimeMilliseconds().ToString();
}
public async static Task<string> GetTokenAsync(string login, string password = null)