Skip to content

Commit

Permalink
maj tests ter
Browse files Browse the repository at this point in the history
  • Loading branch information
MFrangi committed Sep 4, 2024
1 parent 78f45ca commit d6a8b78
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions test/controllers/gpu/municipality.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ describe('with insee=25349', function() {
});
});

describe('with point at [1.654399,48.112235] (Rennes)', function() {
it('should reply a FeatureCollection containing a valid Feature', function(done) {
request(app)
.get('/api/gpu/municipality?geom={"type":"Point","coordinates":[1.654399,48.112235]}')
.expect(200)
.expect(res => {
expect(res.body.features.length).to.eql(1);
const feature = res.body.features[0];
expect(feature.properties.is_rnu).to.eql(false);
})
.end(done);
;
});
});

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

describe('with point at [1.654399,48.112235] (Rennes)', function() {
it('should reply a FeatureCollection containing a valid Feature', function(done) {
request(app)
.get('/api/gpu/municipality?geom={"type":"Point","coordinates":[1.654399,48.112235]}')
.expect(200)
.expect(res => {
expect(res.body.features.length).to.eql(1);
const feature = res.body.features[0];
expect(feature.properties.is_rnu).to.eql(false);
})
.end(done);
;
});
});
});

0 comments on commit d6a8b78

Please sign in to comment.