0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Merge pull request #6839 from acburdine/update-blog-title

Update document title on blog title change
This commit is contained in:
Kevin Ansfield 2016-05-16 10:54:34 +02:00
commit 13f9fc4b0d
2 changed files with 11 additions and 0 deletions

View file

@ -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) {

View file

@ -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(() => {