FIX: Endless spinner when anonymous users navigated to 404s

This commit is contained in:
Robin Ward
2015-06-10 13:12:15 -04:00
parent 6c7e737294
commit e54125b5dc
4 changed files with 14 additions and 2 deletions

View File

@@ -16,6 +16,14 @@ test("Enter without an id", () => {
});
});
test("Enter a 404 topic", (assert) => {
visit("/t/not-found/404");
andThen(() => {
assert.ok(!exists("#topic"), "The topic was not rendered");
assert.ok(find(".not-found").text() === "not found", "it renders the error message");
});
});
test("Enter without access", (assert) => {
visit("/t/i-dont-have-access/403");
andThen(() => {

View File

@@ -179,6 +179,10 @@ export default function() {
return response(403, {});
});
this.get('/t/404.json', () => {
return response(404, "not found");
});
this.get('/t/500.json', () => {
return response(502, {});
});