mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Redirect to default homepage when visiting /login
Previously this was hard-coded to redirect to `/latest`
This commit is contained in:
20
test/javascripts/acceptance/login-redirect-test.js.es6
Normal file
20
test/javascripts/acceptance/login-redirect-test.js.es6
Normal file
@@ -0,0 +1,20 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Login redirect", {});
|
||||
|
||||
QUnit.test("redirects categories to top", async assert => {
|
||||
await visit("/login");
|
||||
assert.equal(
|
||||
currentPath(),
|
||||
"discovery.latest",
|
||||
"it works when latest is the homepage"
|
||||
);
|
||||
Discourse.SiteSettings.top_menu = "categories|latest|top|hot";
|
||||
|
||||
await visit("/login");
|
||||
assert.equal(
|
||||
currentPath(),
|
||||
"discovery.categories",
|
||||
"it works when categories is the homepage"
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user