Move api tests to v2 namespace

This commit is contained in:
Blade Barringer
2015-11-03 08:31:20 -06:00
parent 2713b0f26f
commit 8c95de0835
30 changed files with 42 additions and 38 deletions

View File

@@ -0,0 +1,26 @@
import {
generateUser,
requester,
} from '../../../../helpers/api-integration.helper';
describe('POST /user/pushDevice', () => {
let api;
beforeEach(() => {
return generateUser().then((user) => {
api = requester(user);
});
});
it('registers a device id', () => {
return api.post('/user/pushDevice', {
regId: '123123',
type: 'android',
}).then((devices) => {
let device = devices[0];
expect(device._id).to.exist;
expect(device.regId).to.eql('123123');
expect(device.type).to.eql('android');
});
});
});