FIX: Compatibility between Client and Server routing.

mend
This commit is contained in:
Guo Xiang Tan
2017-09-29 14:02:58 +08:00
committed by Robin Ward
parent c1f174f554
commit a370d7c7fd
7 changed files with 46 additions and 13 deletions

View File

@@ -142,6 +142,26 @@ QUnit.test("Reply as new message", assert => {
});
});
QUnit.test("Visit topic routes", assert => {
visit("/t/12");
andThen(() => {
assert.equal(
find('.fancy-title').text().trim(), 'PM for testing',
'it routes to the right topic'
);
});
visit("/t/280/20");
andThen(() => {
assert.equal(
find('.fancy-title').text().trim(), 'Internationalization / localization',
'it routes to the right topic'
);
});
});
QUnit.test("Updating the topic title with emojis", assert => {
visit("/t/internationalization-localization/280");
click('#topic-title .d-icon-pencil');

View File

@@ -131,6 +131,7 @@ export default function() {
this.put('/u/eviltrout.json', () => response({ user: {} }));
this.get("/t/280.json", () => response(fixturesByUrl['/t/280/1.json']));
this.get("/t/280/20.json", () => response(fixturesByUrl['/t/280/1.json']));
this.get("/t/28830.json", () => response(fixturesByUrl['/t/28830/1.json']));
this.get("/t/9.json", () => response(fixturesByUrl['/t/9/1.json']));
this.get("/t/12.json", () => response(fixturesByUrl['/t/12/1.json']));