Skip to content

Commit

Permalink
maj tests bis
Browse files Browse the repository at this point in the history
  • Loading branch information
MFrangi committed Sep 4, 2024
1 parent 23c6224 commit 78f45ca
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions test/controllers/gpu/municipality.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ import request from 'supertest';
import expect from 'expect.js';
import { app } from '../../../app.js';

describe('with insee=25349', function() {
it('should reply with a valid feature', function(done) {
request(app)
.get('/api/gpu/municipality?insee=25349')
.expect(200)
.expect(res => {
expect(res.body.features.length).to.eql(1);
const feature = res.body.features[0];
expect(feature.properties.name).to.eql('LORAY');
})
.end(done);
;
});
});

describe('/api/gpu/municipality', function() {
describe('without filtering parameter', function() {
it('should reply with 400', function(done) {
Expand All @@ -16,21 +31,6 @@ describe('/api/gpu/municipality', function() {
});
});

describe('with insee=25349', function() {
it('should reply with a valid feature', function(done) {
request(app)
.get('/api/gpu/municipality?insee=25349')
.expect(200)
.expect(res => {
expect(res.body.features.length).to.eql(1);
const feature = res.body.features[0];
expect(feature.properties.name).to.eql('LORAY');
})
.end(done);
;
});
});

describe('with point at [1.654399,48.112235] (Rennes)', function() {
it('should reply a FeatureCollection containing a valid Feature', function(done) {
request(app)
Expand Down

0 comments on commit 78f45ca

Please sign in to comment.