REFACTOR: Remove Discourse.SiteSettings from utilities
This involves a little refactoring of how our `defaultHomepage()` works. It previously would check the meta tag / site settings each time it was called but now it only checks once on application boot.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Login redirect", {});
|
||||
|
||||
acceptance("Login redirect");
|
||||
QUnit.test("redirects login to default homepage", async function(assert) {
|
||||
await visit("/login");
|
||||
assert.equal(
|
||||
@@ -9,8 +8,15 @@ QUnit.test("redirects login to default homepage", async function(assert) {
|
||||
"discovery.latest",
|
||||
"it works when latest is the homepage"
|
||||
);
|
||||
this.siteSettings.top_menu = "categories|latest|top|hot";
|
||||
});
|
||||
|
||||
acceptance("Login redirect - categories default", {
|
||||
settings: {
|
||||
top_menu: "categories|latest|top|hot"
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test("when site setting is categories", async function(assert) {
|
||||
await visit("/login");
|
||||
assert.equal(
|
||||
currentPath(),
|
||||
|
||||
Reference in New Issue
Block a user