Using Discourse.XYZ in templates is deprecated. This fixes that, plus

adds some more integration tests to make sure login required is working.
This commit is contained in:
Robin Ward
2014-09-05 13:08:28 -04:00
parent 4907053cc4
commit 4bec839d9d
8 changed files with 37 additions and 13 deletions

View File

@@ -19,4 +19,24 @@ test("redirect", function() {
andThen(function() {
ok(exists('.login-modal'), "they can still access the login modal");
});
click('.modal-header .close');
andThen(function() {
ok(!exists('.login-modal'), "it closes the login modal");
});
click('#search-button');
andThen(function() {
ok(exists('.login-modal'), "clicking search opens the login modal");
});
click('.modal-header .close');
andThen(function() {
ok(!exists('.login-modal'), "it closes the login modal");
});
click('#site-map');
andThen(function() {
ok(exists('.login-modal'), "site map opens the login modal");
});
});