backbone-generator/templates/collection_view_spec.js.erb

20 lines
463 B
Plaintext
Raw Normal View History

describe('<%= plural_object_name %>View', function() {
var view, collection;
beforeEach(function() {
collection = new <%= plural_object_name %>();
});
it('should render', function() {
2011-05-03 19:43:19 +00:00
view = new <%= plural_object_name %>View({collection: collection});
view.render();
expect($(view.el)).toContain('.list');
2011-05-03 19:43:19 +00:00
expect($(view.el)).toContain('button.new');
});
it('should add a new model when new is clicked', function() {
});
});