Created
April 10, 2015 20:37
-
-
Save charleshan/fadcebebd3eac9c139a7 to your computer and use it in GitHub Desktop.
Revisions
-
Charles Han created this gist
Apr 10, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ if (!(typeof MochaWeb === 'undefined')){ MochaWeb.testOnly(function(){ describe("lists-show", function(){ it("creates a new task", function(){ Template.appBody.fireEvent('click .js-new-list'); var form = $("<form></form>"); var obj = $('<input/>').attr('type', 'text').val('item 1'); form.append(obj); Template.listsShow.fireEvent('submit .js-todo-new', { event: { target: form, preventDefault: function () {} } }); chai.assert.equal(Todos.find().count(), 1); }); afterEach(function() { var list = Lists.findOne(); Lists.remove(list._id); var todos = Todos.findOne(); Todos.remove(todos._id); }); }); }); }