mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
75caeb9341
commit
161afbf3c4
2 changed files with 6 additions and 6 deletions
|
@ -90,8 +90,8 @@ GhostMailer.prototype.fromAddress = function () {
|
|||
domain = config().url.match(new RegExp("^https?://([^/:?#]+)(?:[/:?#]|$)", "i"));
|
||||
domain = domain && domain[1];
|
||||
|
||||
// Default to webmaster@[blog.url]
|
||||
from = 'webmaster@' + domain;
|
||||
// Default to ghost@[blog.url]
|
||||
from = 'ghost@' + domain;
|
||||
}
|
||||
|
||||
return from;
|
||||
|
|
|
@ -174,18 +174,18 @@ describe("Mail", function () {
|
|||
done();
|
||||
});
|
||||
|
||||
it('should fall back to webmaster@[blog.url] as from address', function (done) {
|
||||
it('should fall back to ghost@[blog.url] as from address', function (done) {
|
||||
// Standard domain
|
||||
overrideConfig({url: 'http://default.com', mail:{fromaddress: null}});
|
||||
mailer.fromAddress().should.equal('webmaster@default.com');
|
||||
mailer.fromAddress().should.equal('ghost@default.com');
|
||||
|
||||
// Trailing slash
|
||||
overrideConfig({url: 'http://default.com/', mail:{}});
|
||||
mailer.fromAddress().should.equal('webmaster@default.com');
|
||||
mailer.fromAddress().should.equal('ghost@default.com');
|
||||
|
||||
// Strip Port
|
||||
overrideConfig({url: 'http://default.com:2368/', mail:{}});
|
||||
mailer.fromAddress().should.equal('webmaster@default.com');
|
||||
mailer.fromAddress().should.equal('ghost@default.com');
|
||||
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue