From ecb6b3d7c66b92ce6a75ef339bb6b60de1395df7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 Aug 2018 19:00:25 +0000 Subject: [PATCH] --- test/raven-integration/EventLog/EventLog.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/raven-integration/EventLog/EventLog.cs b/test/raven-integration/EventLog/EventLog.cs index 2c3b8f73..a680260d 100644 --- a/test/raven-integration/EventLog/EventLog.cs +++ b/test/raven-integration/EventLog/EventLog.cs @@ -43,6 +43,9 @@ namespace raven_integration EventLogResponse.ObjectResponse["result"][0]["event"].Value().Should().Be(1);//AyEvent 1 = created EventLogResponse.ObjectResponse["result"][0]["textra"].Should().BeNullOrEmpty(); + //Get current user doing modifications ID + long CurrentUserId = EventLogResponse.ObjectResponse["result"][0]["userId"].Value(); + //RETRIEVE //Get one @@ -85,6 +88,13 @@ namespace raven_integration EventLogResponse.ObjectResponse["result"][2]["textra"].Should().BeNullOrEmpty(); + //Check user log for basic accessibility + EventLogResponse = await Util.GetAsync($"EventLog/UserLog?AyType=3&AyId={CurrentUserId}", await Util.GetTokenAsync("BizAdminFull")); + Util.ValidateHTTPStatusCode(EventLogResponse, 200); + ((JArray)EventLogResponse.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(4);//just one run of the above will be 4 events plus any others from other tests + //Not sure of any easy way to assert the User log is correct other than the count as other tests running concurrently could easily skew this + + //DELETE ApiResponse DELETETestResponse = await Util.DeleteAsync("Widget/" + w2Id.ToString(), await Util.GetTokenAsync("InventoryFull")); Util.ValidateHTTPStatusCode(DELETETestResponse, 204);