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);