Skip to content

Commit

Permalink
Fix status code set with nock for failing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasconner committed May 18, 2018
1 parent c40500f commit f5080c6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/core/datastore/cachestore.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ describe('CacheStore', () => {
const onNextSpy = expect.createSpy();
const lastRequestDate = new Date();
const firstNock = nock(store.client.apiHostname)
.get(`/appdata/${store.client.appKey}/${collection}`)
.reply(200, [entity1, entity2], {
'X-Kinvey-Request-Start': lastRequestDate.toISOString()
});
.get(`/appdata/${store.client.appKey}/${collection}`)
.reply(200, [entity1, entity2], {
'X-Kinvey-Request-Start': lastRequestDate.toISOString()
});

store.pull()
.then(()=>{
Expand All @@ -447,10 +447,10 @@ describe('CacheStore', () => {
});

const thirdNock = nock(store.client.apiHostname)
.get(`/appdata/${store.client.appKey}/${collection}`)
.reply(403, [entity1, entity2], {
'X-Kinvey-Request-Start': lastRequestDate.toISOString()
});
.get(`/appdata/${store.client.appKey}/${collection}`)
.reply(200, [entity1, entity2], {
'X-Kinvey-Request-Start': lastRequestDate.toISOString()
});
store.find()
.subscribe(onNextSpy, done, ()=>{
try{
Expand Down

0 comments on commit f5080c6

Please sign in to comment.