Added unit test for anonymous in authorization.

pull/216/head
Halil İbrahim Kalkan 8 years ago
parent 1528f71413
commit d131d984a2

@ -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