add error test case
All checks were successful
All checks were successful
This commit is contained in:
parent
ae9e1eae47
commit
04ca99afdb
@ -74,7 +74,25 @@ describe("Test the otm city path", () => {
|
||||
});
|
||||
});
|
||||
|
||||
//TODO faire les test pour les cas d'erreur
|
||||
test("It should response the 200 code for GET method (default radius)", done => {
|
||||
request(app)
|
||||
.get("/otm/radius")
|
||||
.query({'lon':'-1.4344594', 'lat' : '46.6686478'})
|
||||
.then(response => {
|
||||
expect(response.statusCode).toBe(200);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test("It should response the 400 code for GET method (missing lon and lat)", done => {
|
||||
request(app)
|
||||
.get("/otm/radius")
|
||||
.then(response => {
|
||||
expect(response.statusCode).toBe(400);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
test("Get bar in radius from API", done => {
|
||||
const out = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user