FIX: Inappropriate error message when you couldn't access a topic
This commit is contained in:
@@ -15,3 +15,19 @@ test("Enter without an id", () => {
|
||||
ok(exists("#topic"), "The topic was rendered");
|
||||
});
|
||||
});
|
||||
|
||||
test("Enter without access", (assert) => {
|
||||
visit("/t/i-dont-have-access/403");
|
||||
andThen(() => {
|
||||
assert.ok(!exists("#topic"), "The topic was not rendered");
|
||||
assert.ok(exists(".topic-error"), "An error message is displayed");
|
||||
});
|
||||
});
|
||||
|
||||
test("Enter with 500 errors", (assert) => {
|
||||
visit("/t/throws-error/500");
|
||||
andThen(() => {
|
||||
assert.ok(!exists("#topic"), "The topic was not rendered");
|
||||
assert.ok(exists(".topic-error"), "An error message is displayed");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user