Skip to content

Commit

Permalink
test: replace test using obsolete preview header
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Oct 10, 2018
1 parent 89ab485 commit afd7fdf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/integration/pagination-test.js
Expand Up @@ -87,24 +87,24 @@ describe('pagination', () => {
it('carries accept header correctly', () => {
nock('https://pagination-test.com', {
reqheaders: {
accept: 'application/vnd.github.v3.star+json'
accept: 'application/vnd.github.hellcat-preview+json'
}
})
.get('/users/octocat/starred')
.get('/user/teams')
.query({ per_page: 1 })
.reply(200, [{}], {
'Link': '<https://pagination-test.com/users/octocat/starred?page=2&per_page=1>; rel="next"',
'X-GitHub-Media-Type': 'github.v3; param=star; format=json'
'Link': '<https://pagination-test.com/user/teams?page=2&per_page=1>; rel="next"',
'X-GitHub-Media-Type': 'github; param=hellcat-preview; format=json'
})
.get('/users/octocat/starred')
.get('/user/teams')
.query({ page: 2, per_page: 1 })
.reply(200, [])

const client = new GitHub({
baseUrl: 'https://pagination-test.com'
})

return client.activity.getStarredReposForUser({ username: 'octocat', per_page: 1 })
return client.users.getTeams({ per_page: 1 })
.then(response => {
return client.getNextPage(response)
})
Expand Down

0 comments on commit afd7fdf

Please sign in to comment.