Browse Source

Fixed test: AuditingInterceptor_Tests

pull/395/head
Halil ibrahim Kalkan 8 years ago
parent
commit
b01d0d259a
  1. 6
      framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingManager.cs
  2. 3
      framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs

6
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;
}

3
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs

@ -35,9 +35,10 @@ namespace Volo.Abp.Auditing
{
var myAuditedObject1 = GetRequiredService<MyAuditedObject1>();
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

Loading…
Cancel
Save