Skip to content

Commit

Permalink
Described assertions to help with maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
ijlee2 authored Mar 6, 2021
1 parent bf148c8 commit 2150cb7
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tests/fastboot/not-found-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ module('FastBoot | not-found', function (hooks) {
setup(hooks);

test('it returns the correct status code', async function (assert) {
const visitHome = await visit('/');
assert.equal(visitHome.statusCode, 200);
let { statusCode } = await visit('/');

const visitFoo = await visit('/foo');
assert.equal(visitFoo.statusCode, 404);
assert.strictEqual(
statusCode,
200,
'The user sees 200 status code when they visit a URL that exists.'
);

({ statusCode } = await visit('/foo-bar-baz'));

assert.strictEqual(
statusCode,
404,
'The user sees 404 status code when they visit a URL that does not exist.'
);
});
});

0 comments on commit 2150cb7

Please sign in to comment.