From 1858a98badaae4749d07b2bc0895f3da82980e7f Mon Sep 17 00:00:00 2001 From: Negue Date: Fri, 8 May 2015 23:46:41 +0200 Subject: [PATCH] add test for push notification api call --- test/api.mocha.coffee | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/api.mocha.coffee b/test/api.mocha.coffee index 2a853562cf..db9a4523cd 100644 --- a/test/api.mocha.coffee +++ b/test/api.mocha.coffee @@ -1029,6 +1029,20 @@ describe "API", -> ], cb ], done + describe "Push-Notifications", -> + it "Register DeviceID", (done) -> + request.post(baseURL + "/user/pushDevice").send( + { regId: "123123", type: "android"} + ).end (res) -> + expectCode res, 200 + + User.findOne + _id: _id + , (err, _user) -> + expect(_user.pushDevices.length).to.be 1 + + done() + describe "Subscriptions", -> user = undefined before (done) ->