Page MenuHomePhabricator
Paste P12062

(An Untitled Masterwork)
ActivePublic

Authored by Jgiannelos on Jul 27 2020, 3:21 PM.
Tags
None
Referenced Files
F31950348: raw.txt
Jul 27 2020, 3:21 PM
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);
});
});