Skip to content

Commit 25f6519

Browse files
DEV: Resolve route name deprecations (#218)
1 parent 3e5b5fc commit 25f6519

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

assets/javascripts/discourse/controllers/docs-index.js renamed to assets/javascripts/discourse/controllers/docs/index.js

File renamed without changes.
File renamed without changes.

assets/javascripts/discourse/templates/docs-index.gjs renamed to assets/javascripts/discourse/templates/docs/index.gjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import LoadMore from "discourse/components/load-more";
1111
import PluginOutlet from "discourse/components/plugin-outlet";
1212
import lazyHash from "discourse/helpers/lazy-hash";
1313
import { i18n } from "discourse-i18n";
14-
import DocsCategory from "../components/docs-category";
15-
import DocsTag from "../components/docs-tag";
16-
import DocsTopic from "../components/docs-topic";
14+
import DocsCategory from "../../components/docs-category";
15+
import DocsTag from "../../components/docs-tag";
16+
import DocsTopic from "../../components/docs-topic";
1717

1818
export default RouteTemplate(
1919
<template>

test/javascripts/unit/controllers/docs-index-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ module("Unit | Controller | docs-index", function (hooks) {
99
const siteSettings = getOwner(this).lookup("service:site-settings");
1010
siteSettings.docs_categories = "1|2|3|333|999";
1111

12-
const controller = getOwner(this).lookup("controller:docs-index");
12+
const controller = getOwner(this).lookup("controller:docs.index");
1313
assert.deepEqual(controller.docsCategories, ["bug", "feature", "meta"]);
1414
});
1515

1616
test("updateSelectedTags correctly removes tags", function (assert) {
17-
const controller = getOwner(this).lookup("controller:docs-index");
17+
const controller = getOwner(this).lookup("controller:docs.index");
1818
controller.filterTags = "foo|bar|baz";
1919

2020
controller.updateSelectedTags({ id: "bar" });
@@ -23,7 +23,7 @@ module("Unit | Controller | docs-index", function (hooks) {
2323
});
2424

2525
test("updateSelectedTags correctly appends tags to list", function (assert) {
26-
const controller = getOwner(this).lookup("controller:docs-index");
26+
const controller = getOwner(this).lookup("controller:docs.index");
2727
controller.filterTags = "foo|bar";
2828

2929
controller.updateSelectedTags({ id: "baz" });
@@ -32,7 +32,7 @@ module("Unit | Controller | docs-index", function (hooks) {
3232
});
3333

3434
test("updateSelectedTags correctly appends tags to empty list", function (assert) {
35-
const controller = getOwner(this).lookup("controller:docs-index");
35+
const controller = getOwner(this).lookup("controller:docs.index");
3636
controller.filterTags = null;
3737

3838
controller.updateSelectedTags({ id: "foo" });

0 commit comments

Comments
 (0)