2018-12-10 10:39:05 -05:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
2020-07-23 13:43:29 -04:00
|
|
|
acceptance("Login redirect");
|
2020-07-09 15:54:53 -04:00
|
|
|
QUnit.test("redirects login to default homepage", async function (assert) {
|
2018-12-10 10:39:05 -05:00
|
|
|
await visit("/login");
|
|
|
|
assert.equal(
|
|
|
|
currentPath(),
|
|
|
|
"discovery.latest",
|
|
|
|
"it works when latest is the homepage"
|
|
|
|
);
|
2020-07-23 13:43:29 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
acceptance("Login redirect - categories default", {
|
|
|
|
settings: {
|
|
|
|
top_menu: "categories|latest|top|hot",
|
|
|
|
},
|
|
|
|
});
|
2018-12-10 10:39:05 -05:00
|
|
|
|
2020-07-23 13:43:29 -04:00
|
|
|
QUnit.test("when site setting is categories", async function (assert) {
|
2018-12-10 10:39:05 -05:00
|
|
|
await visit("/login");
|
|
|
|
assert.equal(
|
|
|
|
currentPath(),
|
|
|
|
"discovery.categories",
|
|
|
|
"it works when categories is the homepage"
|
|
|
|
);
|
|
|
|
});
|