mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
parent
2246b8a803
commit
ccaceb7310
@ -29,7 +29,7 @@
|
||||
return date;
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('adminUrl', function () {
|
||||
Handlebars.registerHelper('admin_url', function () {
|
||||
return Ghost.paths.subdir + '/ghost';
|
||||
});
|
||||
|
||||
|
@ -31,10 +31,19 @@ CasperTest.begin('Ensure a User is Registered', 2, function suite(test) {
|
||||
});
|
||||
}, true);
|
||||
|
||||
CasperTest.begin("Ghost admin will load login page", 2, function suite(test) {
|
||||
CasperTest.begin("Ghost admin will load login page", 3, function suite(test) {
|
||||
casper.thenOpen(url + "ghost", function testTitleAndUrl() {
|
||||
test.assertTitle("Ghost Admin", "Ghost admin has no title");
|
||||
test.assertUrlMatch(/ghost\/signin\/$/, 'We should be presented with the signin page.');
|
||||
|
||||
casper.then(function testLink() {
|
||||
var link = this.evaluate(function (selector) {
|
||||
return document.querySelector(selector).getAttribute('href');
|
||||
}, '.forgotten-password');
|
||||
|
||||
casper.echo('LINK' + link);
|
||||
test.assert(link === '/ghost/forgotten/', 'Has correct forgotten password link');
|
||||
});
|
||||
});
|
||||
}, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user