mirror of
https://github.com/mjrode/WhatToWatch.git
synced 2026-01-03 12:10:06 -06:00
22 lines
542 B
JavaScript
22 lines
542 B
JavaScript
import chai from 'chai';
|
|
import * as nocks from '../../../nocks';
|
|
import app from '../../../../index';
|
|
|
|
describe('Users', () => {
|
|
describe('GET /api/v1/plex/auth', async () => {
|
|
it('should get plex auth token', (done) => {
|
|
nocks.auth();
|
|
|
|
chai
|
|
.request(app)
|
|
.get('/plex/auth')
|
|
.query({ username: 'username', password: 'password' })
|
|
.end((err, res) => {
|
|
res.should.have.status(200);
|
|
res.body.should.equal('testPlexApiToken');
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
});
|