Skip to content

Commit

Permalink
we know data has arrived because we test that the object has inbox
Browse files Browse the repository at this point in the history
  • Loading branch information
wiber committed Mar 20, 2015
1 parent 38e0450 commit d66fca2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
9 changes: 9 additions & 0 deletions lib.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
).count()
smite id, found, 'finding nemo' , eval s
return found
@WFound = (id) ->
smite id, 'scouting nemo' , eval s
found = W.find(
_id: id
,
limit: 1
).count()
smite id, found, 'finding nemo' , eval s
return foun

# TODO should be called with start and end time parameter for exact timings
#nuff said
Expand Down
5 changes: 0 additions & 5 deletions server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ W.after.insert (userId, doc) ->
inbox:
from: doc.from
to: doc.to




smite WI.findOne , 'found this one in WI'

return


Expand Down
2 changes: 1 addition & 1 deletion testUpdateClient.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Meteor.startup ->
two = WI.findOne
_id: rec.to
smite rec, two, testing, 'testing update outbox to inbox', eval s
unless !two
unless !two.inbox
test.equal two.inbox[0].from, rec.from
next()

Expand Down

0 comments on commit d66fca2

Please sign in to comment.