This repository has been archived on 2023-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
osr-discourse-src/test/javascripts/acceptance/login-redirect-test.js
T
Robin Ward 5b276af921 Remove Discourse.SiteSettings from tests (#10193)
* Remove unused Discourse.SiteSettings

* Remove `Discourse.SiteSettings` from many tests

* REFACTOR: `lib:formatter` was using a lot of leaky state

* Remove more `Discourse.SiteSettings` from tests

* More SiteSettings removed from tests
2020-07-09 15:54:53 -04:00

21 lines
500 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"
);
this.siteSettings.top_menu = "categories|latest|top|hot";
await visit("/login");
assert.equal(
currentPath(),
"discovery.categories",
"it works when categories is the homepage"
);
});