Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P12062
(An Untitled Masterwork)
Active
Public
Actions
Authored by
Jgiannelos
on Jul 27 2020, 3:21 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F31950348: raw.txt
Jul 27 2020, 3:21 PM
2020-07-27 15:21:23 (UTC+0)
Subscribers
None
import
express
from
'express'
;
import
request
from
'supertest'
;
const
v1
=
require
(
'../../src/routes/v1'
);
describe
(
'Push notitification routes'
,
()
=>
{
const
tmp
=
express
();
const
obj
=
v1
(
tmp
);
const
app
=
express
();
app
.
use
(
obj
.
router
);
it
(
'Should enqueue an APNS message'
,
(
done
)
=>
{
request
(
app
).
post
(
'/message/apns'
)
.
set
(
'Accept'
,
'application/json'
)
.
set
(
'Content-Type'
,
'application/json'
).
send
({
deviceTokens
:
[
'TOKEN'
],
messageType
:
'checkEchoV1'
,
dryRun
:
false
}).
expect
(
200
,
done
);
});
});
Event Timeline
Jgiannelos
created this paste.
Jul 27 2020, 3:21 PM
2020-07-27 15:21:23 (UTC+0)
Log In to Comment