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);
            }
Exemplo n.º 3
0
            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);
            }
Exemplo n.º 4
0
            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);
            }