Skip to content

Commit

Permalink
tests for population question
Browse files Browse the repository at this point in the history
  • Loading branch information
pelazas committed Feb 23, 2024
1 parent af892d7 commit 2a696ad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions gatewayservice/gateway-service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,20 @@ describe('Gateway Service', () => {
expect(response.statusCode).toBe(200);
expect(response.body.userId).toBe('mockedUserId');
});

it('should not support the country', async () => {
const response = await request(app)
.get('/populationQuestion')
.query({ country: 'invalidCountry' });

expect(response.statusCode).toBe(400);
})

it('should return population data', async () => {
const response = await request(app)
.get('/populationQuestion')
.query({ country: 'spain' });

expect(response.statusCode).toBe(200);
})
});

0 comments on commit 2a696ad

Please sign in to comment.