Skip to content

Commit

Permalink
Merge branch 'jbeoris-ISSUE-174'
Browse files Browse the repository at this point in the history
Closes #174
  • Loading branch information
eddiezane committed Jul 7, 2015
2 parents 895ca57 + ec45ede commit c35e6b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ When filing an issue please include your ```package.json``` and the output of

## Running Tests

The existing tests can be run using [Mocha](http://visionmedia.github.io/mocha/) with the following command:
The existing tests can be run using [Mocha](http://mochajs.org/) with the following command:

```bash
npm test
Expand Down
4 changes: 4 additions & 0 deletions lib/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ Email.prototype.setFrom = function(from) {
return this;
};

Email.prototype.setFromName = function(fromname) {
this.fromname = fromname;
};

Email.prototype.addCc = function(cc) {
this.cc.push(cc);
return this;
Expand Down
7 changes: 7 additions & 0 deletions test/lib/email.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ describe('Email', function () {
expect(email.from).to.eql('[email protected]');
});

it('should be possible to setFromName', function() {
var email = new Email();
expect(email.fromname).to.be.empty;
email.setFromName('Part Kyle');
expect(email.fromname).to.eql('Part Kyle');
});

it('should be possible to setSubject', function() {
var email = new Email();
expect(email.subject).to.be.empty;
Expand Down

0 comments on commit c35e6b5

Please sign in to comment.