mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
23 lines
493 B
JavaScript
23 lines
493 B
JavaScript
integration("Login Required", {
|
|
settings: {
|
|
login_required: true
|
|
}
|
|
});
|
|
|
|
test("redirect", function() {
|
|
visit('/latest');
|
|
andThen(function() {
|
|
equal(currentPath(), "login", "it redirects them to login");
|
|
});
|
|
|
|
click('#site-logo');
|
|
andThen(function() {
|
|
equal(currentPath(), "login", "clicking the logo keeps them on login");
|
|
});
|
|
|
|
click('header .login-button');
|
|
andThen(function() {
|
|
ok(exists('.login-modal'), "they can still access the login modal");
|
|
});
|
|
});
|