public void ShowsDefaultThanksViewWhenConfirmingEmailAddressIsRequired() { var controller = new TestableUsersController(); controller.MockConfig .Setup(x => x.ConfirmEmailAddresses) .Returns(true); var result = controller.Thanks() as ViewResult; Assert.Empty(result.ViewName); Assert.Null(result.Model); }
public void ShowsConfirmViewWithModelWhenConfirmingEmailAddressIsNotRequired() { var controller = new TestableUsersController(); controller.MockConfig .Setup(x => x.ConfirmEmailAddresses) .Returns(false); var result = controller.Thanks() as ViewResult; Assert.Equal("Confirm", result.ViewName); var model = result.Model as EmailConfirmationModel; Assert.True(model.ConfirmingNewAccount); Assert.True(model.SuccessfulConfirmation); }