mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
19 lines
463 B
CoffeeScript
19 lines
463 B
CoffeeScript
|
|
'use strict'
|
||
|
|
|
||
|
|
app = require("../../website/src/server")
|
||
|
|
|
||
|
|
|
||
|
|
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: global.user._id
|
||
|
|
, (err, _user) ->
|
||
|
|
expect(_user.pushDevices.length).to.be 1
|
||
|
|
expect(_user.pushDevices[0].regId).to.be "123123"
|
||
|
|
|
||
|
|
done()
|