backend unit test for the try to define loginUrl
This commit is contained in:
parent
ea3988351c
commit
09f244bc62
|
@ -35,6 +35,17 @@ describe('Auth routes', () => {
|
||||||
};
|
};
|
||||||
loginFunction(req, res);
|
loginFunction(req, res);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should define the loginUrl upon login', done => {
|
||||||
|
req.body.user = 'JessicaJones';
|
||||||
|
req.body.password = 'nightmare';
|
||||||
|
req.body.location = 'http://localhost:5000/auth/?apiKey=salix';
|
||||||
|
res.json = response => {
|
||||||
|
expect(response.loginUrl).toBeDefined();
|
||||||
|
done();
|
||||||
|
};
|
||||||
|
loginFunction(req, res);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when the user is incorrect', () => {
|
describe('when the user is incorrect', () => {
|
||||||
|
|
Loading…
Reference in New Issue