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"); }
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"); }
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"); }
public void It_should_redirect_to_sites() { _Response.ShouldHaveRedirectedTo("/Sites"); }
public void It_should_redirect_to_home() { _Response.ShouldHaveRedirectedTo("/"); }
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"); }