mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
add test for push notification api call
This commit is contained in:
parent
90edb7719f
commit
1858a98bad
1 changed files with 14 additions and 0 deletions
|
|
@ -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) ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue