I have been writing some tests on my Fluent Security configuration off late. Though I can write tests verifying if a controller action method has a particular policy applied e.g.
expectations.Expect<HomeController>(x=>x.Index()).Has<IgnorePolicy>();
However, what I am looking for is, if I can write role specific tests.
e.g If I have given Admin Role access only to Index() of HomeController, I want to test something like
expectations.Expect<HomeController>(x=>x.Index()).Has<RequireRolePolicy>().For("Admin");
I do not find any examples on net, or any extensions in FLuentSecurity.TestHelper that can help me do this. any thoughts?