Skip to content

Commit

Permalink
Trying some Unit testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
eprochasson committed Jul 25, 2013
1 parent 04154f1 commit c98144b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
none
0.6.4.1
14 changes: 14 additions & 0 deletions tests/messages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var assert = require('assert');

suite('Messages', function(){
test('in the server', function(done, server){
server.eval(function(){
Messages.insert({to:"random", body: "Hello World!"});
var message = Messages.find().fetch();
emit('messages', message);
})
});
server.once('messages', function(message){
assert.equal(message.length, 1);
})
});

0 comments on commit c98144b

Please sign in to comment.