Last active
October 15, 2015 16:59
-
-
Save RobbertWolfs/fde357daf24b2517de46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should return objects', function () { | |
var backend = { transfer: sandbox.stub() }; | |
var stub2 = sandbox.stub(repository, 'getMails').returns([ | |
{id: 123, to: '[email protected]', body: 'aaaa...'}, | |
{id: 123, to: '[email protected]', body: 'bbb...'} | |
]); | |
mailSystem.transferEuriMails(backend); | |
expect(stub2).to.have.been.called; | |
var mails = stub2.returnValues[0][0]; | |
expect(mails).to.include.keys(['to', 'id', 'body']); | |
expect(backend.transfer).to.have.been.called; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment