Browse Source

Added unit test for anonymous in authorization.

pull/216/head
Halil İbrahim Kalkan 9 years ago
parent
commit
d131d984a2
  1. 13
      test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs

13
test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using Shouldly;
using Volo.Abp.Authorization.TestServices;
using Xunit;
@ -30,5 +31,17 @@ namespace Volo.Abp.Authorization
await _myAuthorizedService1.ProtectedByClassAsync();
});
}
[Fact]
public void Should_Allow_To_Call_Anonymous_Method()
{
_myAuthorizedService1.Anonymous().ShouldBe(42);
}
[Fact]
public async Task Should_Allow_To_Call_Anonymous_Method_Async()
{
(await _myAuthorizedService1.AnonymousAsync()).ShouldBe(42);
}
}
}
Loading…
Cancel
Save