Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@giovanettid
Created February 23, 2016 20:41
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 giovanettid/686b9299f8387e4f5609 to your computer and use it in GitHub Desktop.
Save giovanettid/686b9299f8387e4f5609 to your computer and use it in GitHub Desktop.
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