c4d5c0c91b
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.
27 lines
627 B
JavaScript
27 lines
627 B
JavaScript
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
acceptance("Login redirect");
|
|
QUnit.test("redirects login to default homepage", async function(assert) {
|
|
await visit("/login");
|
|
assert.equal(
|
|
currentPath(),
|
|
"discovery.latest",
|
|
"it works when latest is the homepage"
|
|
);
|
|
});
|
|
|
|
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(),
|
|
"discovery.categories",
|
|
"it works when categories is the homepage"
|
|
);
|
|
});
|