2018-12-10 10:39:05 -05:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
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-09 15:54:53 -04:00
|
|
|
this.siteSettings.top_menu = "categories|latest|top|hot";
|
2018-12-10 10:39:05 -05:00
|
|
|
|
|
|
|
await visit("/login");
|
|
|
|
assert.equal(
|
|
|
|
currentPath(),
|
|
|
|
"discovery.categories",
|
|
|
|
"it works when categories is the homepage"
|
|
|
|
);
|
|
|
|
});
|