예제 #1
0
        public void ShouldRedirectToLoginWithSecureRequest()
        {
            var bootstrapper = new CustomTestBootstrapper();
            var browser      = new Browser(bootstrapper);

            BrowserResponse response = browser.Get("/admin", with => { with.HttpRequest(); });

            response.ShouldHaveRedirectedTo("/login?returnUrl=/admin");
        }
예제 #2
0
        public void ShouldAccessLoginAfterSuccessfulLogin()
        {
            var bootstrapper = new CustomTestBootstrapper();
            var browser      = new Browser(bootstrapper);

            BrowserResponse response = browser.Post("/login", (with) => {
                with.HttpRequest();
                with.FormValue("Username", "admin");
                with.FormValue("Password", "password");
            });

            response.ShouldHaveRedirectedTo("/admin");
        }
예제 #3
0
        public void ShouldCreateClientWithNewSignUp()
        {
            var clientService = new ClientService();
            var bootstrapper  = new CustomTestBootstrapper(clientService);
            var browser       = new Browser(bootstrapper);

            BrowserResponse response = browser.Post("/SignUp", (with) => {
                with.HttpRequest();
                with.FormValue("ClientName", "Unique Client Name");
                with.FormValue("ContactName", "James Dean");
                with.FormValue("ContactPhone", "8008674309");
                with.FormValue("ContactEmail", "*****@*****.**");
            });

            response.ShouldHaveRedirectedTo("/SignUp/ThankYou");

            var clients = clientService.GetAll();

            Assert.IsTrue(clients.Any(c => c.ClientName.ToString().Equals("Unique Client Name")));
        }
 public void It_should_redirect_to_get()
 {
     _Response.ShouldHaveRedirectedTo("/Deploy/jabbr");
 }
예제 #5
0
 public void It_should_redirect_to_sites()
 {
     _Response.ShouldHaveRedirectedTo("/Sites");
 }
예제 #6
0
 public void It_should_redirect_to_home()
 {
     _Response.ShouldHaveRedirectedTo("/");
 }
예제 #7
0
 public void It_should_redirect_to_the_apps_page()
 {
     _Response.ShouldHaveRedirectedTo("/Apps");
 }
 public void It_should_redirect_to_sign_on()
 {
     _Response.ShouldHaveRedirectedTo("/SignIn?redirect=" + Uri.EscapeDataString("/Sites"));
 }
 public void It_should_redirect_to_apps()
 {
     _Response.ShouldHaveRedirectedTo("/Test");
 }