Skip to content

Commit

Permalink
fix: use getUpdates to return matches
Browse files Browse the repository at this point in the history
  • Loading branch information
hfreire committed Jul 2, 2017
1 parent 796a86a commit 108d2c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/happn-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('Happn Wrapper', () => {
})
})

describe('when getting update', () => {
describe('when getting updates', () => {
const userId = 'my-user-id'
const statusCode = 200
const body = {}
Expand Down Expand Up @@ -329,17 +329,17 @@ describe('Happn Wrapper', () => {
td.verify(request.get(captor.capture()), { ignoreExtraArgs: true, times: 1 })

const options = captor.value
options.should.have.nested.property('qs.types', 473)
options.should.have.nested.property('qs.types', 563)
options.should.have.nested.property('qs.limit')
options.should.have.nested.property('qs.offset')
options.should.have.nested.property('qs.fields', 'id,modification_date,notification_type,nb_times,notifier.fields(id,about,job,is_accepted,birth_date,workplace,my_relation,distance,gender,my_conversation,is_charmed,nb_photos,first_name,last_name,age,profiles.mode(1).width(360).height(640).fields(width,height,mode,url))')
options.should.have.nested.property('qs.fields', 'id,creation_date,modification_date,notification_type,nb_times,notifier.fields(id,about,job,is_accepted,birth_date,workplace,my_relation,distance,gender,my_conversation,is_charmed,nb_photos,first_name,last_name,age,profiles.mode(1).width(360).height(640).fields(width,height,mode,url))')
})
})

it('should resolve with response body as data', () => {
return subject.getUpdates()
.then((data) => {
data.should.be.eql(body)
data.should.have.property('matches', body)
})
})
})
Expand Down

0 comments on commit 108d2c9

Please sign in to comment.