Created
February 23, 2016 20:41
-
-
Save giovanettid/686b9299f8387e4f5609 to your computer and use it in GitHub Desktop.
This file contains 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
describe('Todo', function() { | |
var Todo = requirejs('models/todo'); | |
var todo; | |
beforeEach(function() { | |
todo = new Todo(); | |
}); | |
it('defaults are empty title and not completed', function() { | |
expect(todo.get('title')).to.be.a('string').and.to.be.empty; | |
expect(todo.get('completed')).to.be.false; | |
}); | |
it('when toggle then completed', function() { | |
todo.toggle(); | |
expect(todo.get('completed')).to.be.true; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment