Skip to content

Commit

Permalink
Fix @hapi/hapi breaking tests about 204 default status code for empty…
Browse files Browse the repository at this point in the history
… reponse

See hapijs/hapi#4017 section "Change default empty status code to 204"
  • Loading branch information
jbuget committed May 22, 2020
1 parent 4c57609 commit ace6440
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Integration | Application | Route | AuthenticationRouter', () => {
const response = await server.inject(options);

// then
expect(response.statusCode).to.equal(200);
expect(response.statusCode).to.equal(204);
});

it('should return a response with HTTP status code 200 even if there is no scope in the request', async () => {
Expand All @@ -69,7 +69,7 @@ describe('Integration | Application | Route | AuthenticationRouter', () => {
const response = await server.inject(options);

// then
expect(response.statusCode).to.equal(200);
expect(response.statusCode).to.equal(204);
});

it('should return a 400 when grant type is not "password"', async () => {
Expand Down Expand Up @@ -168,7 +168,7 @@ describe('Integration | Application | Route | AuthenticationRouter', () => {
const response = await server.inject(options);

// then
expect(response.statusCode).to.equal(200);
expect(response.statusCode).to.equal(204);
});

it('should return a 400 when grant type is not "access_token" nor "refresh_token"', async () => {
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('Integration | Application | Route | AuthenticationRouter', () => {
const response = await server.inject(options);

// then
expect(response.statusCode).to.equal(200);
expect(response.statusCode).to.equal(204);
});

it('should return a JSON API error (415) when request "Content-Type" header is not "application/x-www-form-urlencoded"', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Integration | Application | Organization-invitations | organization-in
const response = await httpTestServer.request('POST', '/api/organization-invitations/1/response', payload);

// then
expect(response.statusCode).to.equal(200);
expect(response.statusCode).to.equal(204);
});
});

Expand Down

0 comments on commit ace6440

Please sign in to comment.