Skip to content

Instantly share code, notes, and snippets.

@ruzzbot
Created October 10, 2012 19:13
Show Gist options
  • Save ruzzbot/3867773 to your computer and use it in GitHub Desktop.
Save ruzzbot/3867773 to your computer and use it in GitHub Desktop.
simple-tests.jasmine.coffee
define [ "modules/user" ], (User)->
describe "User", ->
users = new User.Collection()
me = null
it "create new user", ->
users.create
"email" : "[email protected]"
"password" : "guest"
me = users.at( 0 )
expect( users.length ).toBe( 1 )
it "successfully save session in localstorage", ->
me.save()
expect( typeof me ).toBe "object"
it "has required parameters", ->
expect( me.get 'email' ).toBe "[email protected]"
expect( me.get 'password' ).toBe "guest"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment