mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
TESTS: Integration tests for login_required
This commit is contained in:
@ -1,21 +1,28 @@
|
||||
integration("Static");
|
||||
|
||||
test("Static Pages", function() {
|
||||
expect(4);
|
||||
visit("/faq");
|
||||
andThen(function() {
|
||||
ok(exists(".body-page"), "The content is present");
|
||||
});
|
||||
|
||||
visit("/guidelines");
|
||||
andThen(function() {
|
||||
ok(exists(".body-page"), "The content is present");
|
||||
});
|
||||
|
||||
visit("/tos");
|
||||
andThen(function() {
|
||||
ok(exists(".body-page"), "The content is present");
|
||||
});
|
||||
|
||||
visit("/privacy");
|
||||
andThen(function() {
|
||||
ok(exists(".body-page"), "The content is present");
|
||||
});
|
||||
|
||||
visit("/login");
|
||||
andThen(function() {
|
||||
equal(currentPath(), "discovery.latest", "it redirects them to latest unless `login_required`");
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user