mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 22:43:49 +08:00
c2276f0b7e
followup on dc14d156
We previously had no tests and no cleanup
22 lines
565 B
JavaScript
22 lines
565 B
JavaScript
import { acceptance } from "helpers/qunit-helpers";
|
|
import {
|
|
nextTopicUrl,
|
|
previousTopicUrl,
|
|
setTopicId
|
|
} from "discourse/lib/topic-list-tracker";
|
|
acceptance("Topic list tracking");
|
|
|
|
QUnit.test("Navigation", async assert => {
|
|
await visit("/");
|
|
let url = await nextTopicUrl();
|
|
assert.equal(url, "/t/error-after-upgrade-to-0-9-7-9/11557");
|
|
|
|
setTopicId(11557);
|
|
|
|
url = await nextTopicUrl();
|
|
assert.equal(url, "/t/welcome-to-meta-discourse-org/1");
|
|
|
|
url = await previousTopicUrl();
|
|
assert.equal(url, "/t/error-after-upgrade-to-0-9-7-9/11557");
|
|
});
|