Created
June 6, 2012 20:44
-
-
Save logicbomb/2884653 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Category("Smoke Tests")] | |
| [TestFixture] | |
| public class CompositeSmokeTests : ILoggingSource | |
| { | |
| private Browser _browser; | |
| private SmokeTestBootstrapper _bootstrapper; | |
| [TestFixtureSetUp] | |
| public void InitializeDatabase() | |
| { | |
| var connectionString = ConfigurationManager.ConnectionStrings["OrmLiteConnectionString"].ConnectionString; | |
| Database.Initialize(connectionString); | |
| } | |
| [SetUp] | |
| public void SetupFixture() | |
| { | |
| _bootstrapper = new SmokeTestBootstrapper("Lemur.StoreManager"); | |
| _browser = new Browser(_bootstrapper); | |
| } | |
| [Test] | |
| public void Test() | |
| { | |
| var resp = _browser.Post("/login", with => | |
| { | |
| with.FormValue("Email", "superadmin"); | |
| with.FormValue("Password", "Password"); | |
| with.Query("returnUrl", "/store/" + SmokeTestData.StoreId + "/notifications"); | |
| }).Then.Get("/store/" + SmokeTestData.StoreId + "/notifications"); | |
| var html = resp.Body.AsString(); | |
| Assert.AreEqual(HttpStatusCode.OK, resp.StatusCode); | |
| this.WriteInfoMessage(html); | |
| Assert.Less(html.IndexOf("Error Compiling Template:", StringComparison.Ordinal), 0); | |
| Assert.Less(html.IndexOf("<title>500 means server error</title>", StringComparison.Ordinal), 0); | |
| Assert.True(true); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment