Created
June 1, 2012 23:34
-
-
Save bitemyapp/2855769 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
var page = require('webpage').create(); | |
var href = "http://localhost:5000"; | |
var step = 0; | |
var raise = function(error) { | |
console.log("Error raised: " + error); | |
phantom.exit(1); | |
} | |
var assertEquals = function(first, second, message) { | |
if (first === second) { | |
console.log(message + " successful"); | |
} else { | |
raise(first + " and " + second + " were unequal, you assertEquals'd them"); | |
} | |
} | |
function test_signup_first() { | |
page.open(href + "/signup/", function (status) { | |
var title = page.evaluate(function () { | |
return document.title; | |
}); | |
assertEquals(title, "Nutrivise", "Title should equal Nutrivise"); | |
}); | |
} | |
function test_signup_second() { | |
page.open(href + "/signup/", function (status) { | |
var title = page.evaluate(function () { | |
return document.title; | |
}); | |
assertEquals(title, "Nutrivise", "Title should equal Nutrivise"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment