Skip to content

Instantly share code, notes, and snippets.

@joques
Created January 15, 2012 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joques/f1bd9ebda405274e2b28 to your computer and use it in GitHub Desktop.
Save joques/f1bd9ebda405274e2b28 to your computer and use it in GitHub Desktop.
auth_danny = (error, brs, status) ->
if error then throw error
brs.fill 'username', 'danny', ->
brs.fill 'password', 'devitto', ->
brs.pressButton 'Sign In', ->
assert.equal(brs.location.pathname, '/')
console.log "new html content " + brs.html
describe 'authenticate', ->
it 'should successfully authenticate user danny', (auth_danny) ->
browser.visit "https://localhost:3000/sessions/new", { debug: true }, (error, brs, st) ->
console.log "Exploring doc " + brs.html
auth_danny(error, brs, st)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment