Skip to content

Commit

Permalink
Allow 304 as an okay status
Browse files Browse the repository at this point in the history
 🐿 v2.6.0
  • Loading branch information
adgad committed Feb 20, 2018
1 parent 8613ce3 commit 5ed4456
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/smoke/checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
result: testPage.check.status === testPage.redirect.to
};
} else {
return { expected: testPage.check.status, actual: testPage.status, result: testPage.status === testPage.check.status };
return { expected: testPage.check.status, actual: testPage.status, result: testPage.status === testPage.check.status || testPage.status === 304 && testPage.check.status === 200 };
}
},

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/smoke-pass.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = [{
urls: {
'/status/200': 200,
'/status/204': 204, // this will be skipped because we don't support it yet!
'/status/304': 200, // browsers will sometimes 304, so let's pretend like that is okay
'/status/404': {
status: 404,
content: '404',
Expand Down
2 changes: 1 addition & 1 deletion test/tasks/smoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Smoke Tests of the Smoke', () => {
});
return smoke.run()
.then((results) => {
expect(results.passed.length).toEqual(10);
expect(results.passed.length).toEqual(11);
expect(results.failed.length).toEqual(0);
done();
});
Expand Down

0 comments on commit 5ed4456

Please sign in to comment.