Example #1
0
 public void GivenAStatusAction_ThenRendersTheDefaultView()
 {
     // Arrange
     var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);
     // Act
     controller.WithCallTo(c => c.Status())
         // Assert
         .ShouldRenderDefaultView();
 }
Example #2
0
 public void GivenAResendVerificationCodeAction_WhenAnonymousUser_ThenRendersTheDefaultView()
 {
     // Arrange
     var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);
     // Act
     controller.WithCallTo(c => c.ResendVerificationCode("*****@*****.**"))
         // Assert
         .ShouldRenderDefaultView();
 }
Example #3
0
        public void GivenAResendVerificationCodeAction_ThenRendersTheDefaultView()
        {
            // Arrange
            var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);

            // Act
            controller.WithCallTo(c => c.ResendVerificationCode(ApplicationMessages.VerificationCodeResent))
                // Assert
                .ShouldRenderDefaultView();
        }
Example #4
0
 public void GivenAResendVerificationCodeAction_WhenTheModelStateIsNotValid_ThenRendersTheDefaultView()
 {
     // Arrange
     var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);
     // Act
     var model = new ResendVerifyCodeViewModel();
     controller.ModelState.AddModelError("", "Some kind of error");
     controller.WithCallTo(c => c.ResendVerificationCode(model))
         // Assert
         .ShouldRenderDefaultView();
 }
Example #5
0
 public void GivenAResendVerificationCodeAction_WhenTheModelStateIsValid_ThenItRedirectsToVerifyRegsitrationCode()
 {
     // Arrange
     var controller = new AccountController(CurrentUserManagerMock.Object, CurrentSignInManagerMock.Object);
     // Act
     var model = new ResendVerifyCodeViewModel()
     {
         Email = "*****@*****.**",
     };
     controller.WithCallTo(c => c.ResendVerificationCode(model))
         // Assert
         .ShouldRedirectTo<AccountController>(c => c.VerifyRegistrationCode(new VerifyCodeViewModel()));
 }