TESTS: Integration tests for login_required

This commit is contained in:
Robin Ward
2014-07-31 17:59:52 -04:00
parent e63cdc50bb
commit adea5b36a0
4 changed files with 27 additions and 10 deletions

View File

@ -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`");
});
});