mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
TESTS: Integration tests for login_required
This commit is contained in:
parent
e63cdc50bb
commit
adea5b36a0
4 changed files with 27 additions and 10 deletions
|
@ -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`");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue