mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
2246b8a803
commit
ccaceb7310
2 changed files with 12 additions and 3 deletions
|
@ -29,7 +29,7 @@
|
||||||
return date;
|
return date;
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('adminUrl', function () {
|
Handlebars.registerHelper('admin_url', function () {
|
||||||
return Ghost.paths.subdir + '/ghost';
|
return Ghost.paths.subdir + '/ghost';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,19 @@ CasperTest.begin('Ensure a User is Registered', 2, function suite(test) {
|
||||||
});
|
});
|
||||||
}, true);
|
}, 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() {
|
casper.thenOpen(url + "ghost", function testTitleAndUrl() {
|
||||||
test.assertTitle("Ghost Admin", "Ghost admin has no title");
|
test.assertTitle("Ghost Admin", "Ghost admin has no title");
|
||||||
test.assertUrlMatch(/ghost\/signin\/$/, 'We should be presented with the signin page.');
|
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);
|
}, true);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue