From b01d0d259ac6b734ef4bd3e4eab153a014d24092 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 18 Jul 2018 17:20:25 +0300 Subject: [PATCH] Fixed test: AuditingInterceptor_Tests --- .../Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs | 6 ------ .../Volo/Abp/Auditing/AuditingInterceptor_Tests.cs | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs b/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs index b875eaca37..fca0a8dd8e 100644 --- a/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs +++ b/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs @@ -137,12 +137,6 @@ namespace Volo.Abp.Auditing return false; } - if (!Options.IsEnabledForGetRequests && !auditLog.EntityChanges.Any()) - { - //TODO: We can create another option for that: IsEnabledIfNoChangesDone? - return false; - } - return true; } diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs index b32d94e1e1..141bf01688 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs @@ -35,9 +35,10 @@ namespace Volo.Abp.Auditing { var myAuditedObject1 = GetRequiredService(); - using (_auditingManager.BeginScope()) + using (var scope = _auditingManager.BeginScope()) { await myAuditedObject1.DoItAsync(new InputObject { Value1 = "fourty-two", Value2 = 42 }); + await scope.SaveAsync(); } #pragma warning disable 4014