mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
update document title on blog title change
no issue - force document.title to recompute when the blog title is changed in settings/general
This commit is contained in:
parent
7c786a6385
commit
2a9c916a58
2 changed files with 11 additions and 0 deletions
|
@ -86,6 +86,10 @@ export default Controller.extend(SettingsSaveMixin, {
|
|||
return this.get('model').save().then((model) => {
|
||||
config.set('blogTitle', model.get('title'));
|
||||
|
||||
// this forces the document title to recompute after
|
||||
// a blog title change
|
||||
this.send('collectTitleTokens', []);
|
||||
|
||||
return model;
|
||||
}).catch((error) => {
|
||||
if (error) {
|
||||
|
|
|
@ -89,6 +89,13 @@ describe('Acceptance: Settings - General', function () {
|
|||
expect(find('input#permalinks').prop('checked'), 'date permalinks checkbox').to.be.false;
|
||||
});
|
||||
|
||||
fillIn('#settings-general input[name="general[title]"]', 'New Blog Title');
|
||||
click('.view-header .btn.btn-blue');
|
||||
|
||||
andThen(() => {
|
||||
expect(document.title, 'page title').to.equal('Settings - General - New Blog Title');
|
||||
});
|
||||
|
||||
click('.blog-logo');
|
||||
|
||||
andThen(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue