Ejemplo n.º 1
0
        public void UnlockUserTest_user_is_actually_unlocked_and_returns_true()
        {
            //Arrange
            var config = CreateConfigFake();

            _provider.Initialize(config["applicationName"], config);
            User wilby = null;

            using (var session = RavenDBMembershipProvider.DocumentStore.OpenSession())
            {
                wilby             = CreateUserFake();
                wilby.IsLockedOut = true;

                session.Store(wilby);
                session.SaveChanges();
            }

            //Act
            bool results     = _provider.UnlockUser(wilby.Username);
            var  updatedUser = GetUserFromDocumentStore(RavenDBMembershipProvider.DocumentStore, wilby.Username);

            //Assert
            Assert.IsTrue(results);
            Assert.IsFalse(updatedUser.IsLockedOut);
        }