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');
equal(currentPath(), "login", "clicking the logo keeps them on login");
click('header .login-button');
ok(exists('.login-modal'), "they can still access the login modal");
click('.modal-header .close');
ok(!exists('.login-modal'), "it closes the login modal");
click('#search-button');
ok(exists('.login-modal'), "clicking search opens the login modal");
click('#site-map');
ok(exists('.login-modal'), "site map opens the login modal");