Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (14 sloc) 485 Bytes
Browser = require("zombie")
assert = require("assert")
user = "admin"
pass = "password"
# Load the page from localhost
browser = new Browser()
browser.site = "http://localhost"
browser.visit "/", ->
# Fill email, password and submit form
browser.fill("name", user).fill("pass", pass).pressButton "Log in", ->
# Form submitted, new page loaded.
assert.ok browser.success
assert.equal browser.text(".admin-menu-account a"), "Hello " + user
console.log "Logged In"