Skip to content

Commit

Permalink
Added an extra test for Faker.Hipster.word to make sure we only get a…
Browse files Browse the repository at this point in the history
… single word.
  • Loading branch information
mrstebo committed May 22, 2018
1 parent f6aac08 commit 9e3daf7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/faker/hipster.spec.js
Expand Up @@ -12,6 +12,13 @@ describe('Hipster', () => {
this.stub(Faker.Random, 'element').withArgs(data['words']).returns('word');
expect(Faker.Hipster.word()).to.eql('word');
}));

it('should make sure only a single word is returned', sinonTest(function() {
this.stub(Faker.Random, 'element').withArgs(data['words'])
.onFirstCall().returns('two words')
.onSecondCall().returns('word');
expect(Faker.Hipster.word()).to.eql('word');
}));
});

describe('#words', () => {
Expand Down

0 comments on commit 9e3daf7

Please sign in to comment.