DEV: avoid leaked HTTP call in test

We were running a failed request on route transition, this avoids it by
faking it.
This commit is contained in:
Sam Saffron 2020-04-03 14:45:27 +11:00
parent 20d8b49add
commit 8d5cc8956d
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

@ -841,6 +841,10 @@ QUnit.test("can reply to a private message", async assert => {
return [200, { "Content-Type": "application/json" }, {}];
});
// a bit messy but we need a fake here cause we issue a route transition
// to the new post
server.get("/t/34/4.json", () => server.get("/t/34.json"));
await visit("/t/34");
await click(".topic-post:eq(0) button.reply");
await fillIn(".d-editor-input", "this is the *content* of the reply");