Skip to content

Commit

Permalink
Fix client wrapper unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
corycaywood committed Mar 22, 2017
1 parent 882c4ef commit 397e95c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/unit/zendesk-uploader/client-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,13 @@ describe('ZendeskClientWrapper', () => {
let clock = sandbox.useFakeTimers();
let createArticle = this.zendeskClient.articles.create(123, {});

clock.tick(500 + 1000 + 2000);
clock.tick(500);
expect(stub).to.be.calledTwice;

clock.tick(1000);
expect(stub).to.be.calledThrice;

clock.tick(2000);
return createArticle.then(() => {
expect(stub.callCount).to.be.equal(4);
});
Expand All @@ -166,7 +172,10 @@ describe('ZendeskClientWrapper', () => {
let clock = sandbox.useFakeTimers();
let createArticle = this.zendeskClient.articles.create(123, {});

clock.tick(500 + 1000 + 2000 + 4000 + 8000 + 8000);
clock.tick(500 + 1000 + 2000 + 4000 + 8000);
expect(stub.callCount).to.be.equal(6);

clock.tick(8000);
return createArticle.then(() => {
expect(stub.callCount).to.be.equal(7);
});
Expand Down

0 comments on commit 397e95c

Please sign in to comment.