feat: open-trip-api-drink #11
@ -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 => {
|
test("Get bar in radius from API", done => {
|
||||||
const out = {
|
const out = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user