Skip to content

Instantly share code, notes, and snippets.

@leoallen85
Created November 26, 2014 11:22
Show Gist options
  • Select an option

  • Save leoallen85/451ec2fb6885973dc936 to your computer and use it in GitHub Desktop.

Select an option

Save leoallen85/451ec2fb6885973dc936 to your computer and use it in GitHub Desktop.
Messing around with Velocity tests
describe("Tasks", function() {
beforeEach(function () {
MeteorStubs.install();
mock(global, 'Columns');
});
afterEach(function () {
MeteorStubs.uninstall();
});
// it("finds a user", function() {
// expect(Tasks.findForUser('leo')).toEqual('we found for leo');
// });
it("barks like a dog", function(){
expect(TaskId).toEqual('woof')
});
it("adds the postit to the column", function(){
spyOn(Columns, "find").andReturn({id: 123});
Columns.addPostit(postit)
expect(postit.column_id).toEqual(123)
});
});
Columns.addPostit(postit) = function(postIt){
var column = this.find({postIt: postIt.id});
postIt.column_id = column.id;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment