Ejemplo n.º 1
0
        public void SiteAdminsCanEditAllReadyTasks()
        {
            var claimsPrincipal = new ClaimsPrincipal();

            claimsPrincipal.AddIdentity(new ClaimsIdentity(new List <Claim>
            {
                new Claim(ClaimTypes.NameIdentifier, "1"),
                new Claim(AllReady.Security.ClaimTypes.UserType, Enum.GetName(typeof(UserType), UserType.SiteAdmin))
            }));

            var sut    = new DetermineIfATaskIsEditable();
            var result = sut.For(claimsPrincipal, null, null);

            Assert.True(result);
        }