mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FIX: Support ember app routing to topics with only slugs
This commit is contained in:
@ -34,6 +34,10 @@ export default function() {
|
||||
}
|
||||
});
|
||||
|
||||
this.get("/t/id_for/:slug", function() {
|
||||
return response({id: 280, slug: "internationalization-localization", url: "/t/internationalization-localization/280"});
|
||||
});
|
||||
|
||||
this.get("/404-body", function() {
|
||||
return [200, {"Content-Type": "text/html"}, "<div class='page-not-found'>not found</div>"];
|
||||
});
|
||||
|
@ -1,11 +1,16 @@
|
||||
integration("View Topic");
|
||||
|
||||
test("Enter a Topic", function() {
|
||||
expect(2);
|
||||
|
||||
visit("/t/internationalization-localization/280");
|
||||
andThen(function() {
|
||||
ok(exists("#topic"), "The was rendered");
|
||||
ok(exists("#topic"), "The topic was rendered");
|
||||
ok(exists("#topic .post-cloak"), "The topic has cloaked posts");
|
||||
});
|
||||
});
|
||||
|
||||
test("Enter without an id", function() {
|
||||
visit("/t/internationalization-localization");
|
||||
andThen(function() {
|
||||
ok(exists("#topic"), "The topic was rendered");
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user