Skip to content

Commit

Permalink
test(apple): send an updated pass (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
aahna-ashina committed Sep 7, 2022
1 parent 0b79dae commit 9f853c7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ describe('Send an Updated Pass', () => {
expect(JSON.stringify(response.body)).to.contain('Request Not Authorized: Missing/empty header: Authorization')
})
})

it('success when valid authentication token in header', () => {
cy.request({
method: 'GET',
url: '/api/apple/v1/passes/pass.org.passport.nation3/333',
headers: {
'Authorization': 'ApplePass 0x3fbeb3ae33af3fb33f3d33333303d333a333aff33f3133efbc3330333adb333a'
},
failOnStatusCode: false
}).then((response) => {
expect(response.status).to.eq(200)
expect(response.headers).to.include({
'content-type': 'application/vnd.apple.pkpass'
})
})
})
})

export {}
4 changes: 3 additions & 1 deletion server/cypress/e2e/api/downloadPass.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ describe('/api/downloadPass', () => {
failOnStatusCode: false
}).then((response) => {
expect(response.status).to.eq(200)
// expect(JSON.stringify(response.body)).to.contain('Invalid signature')
expect(response.headers).to.include({
'content-type': 'application/vnd.apple.pkpass'
})
})
})
})
Expand Down

0 comments on commit 9f853c7

Please sign in to comment.