mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-31 22:11:28 +00:00
companion: fix tests
This commit is contained in:
parent
deec61bc4e
commit
c0c5b3edfb
2 changed files with 3 additions and 3 deletions
|
|
@ -94,10 +94,10 @@ describe('test authentication', () => {
|
|||
test('the token gets sent via cookie and html', () => {
|
||||
// see mock ../../src/server/helpers/oauth-state above for state values
|
||||
return request(authServer)
|
||||
.get(`/drive/send-token?uppyAuthToken=${token}&state=state-with-newer-version`)
|
||||
.get(`/dropbox/send-token?uppyAuthToken=${token}&state=state-with-newer-version`)
|
||||
.expect(200)
|
||||
.expect((res) => {
|
||||
const authToken = res.header['set-cookie'][0].split(';')[0].split('uppyAuthToken--google=')[1]
|
||||
const authToken = res.header['set-cookie'][0].split(';')[0].split('uppyAuthToken--dropbox=')[1]
|
||||
expect(authToken).toEqual(token)
|
||||
const body = `
|
||||
<!DOCTYPE html>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ authServer.all('*/callback', (req, res, next) => {
|
|||
}
|
||||
next()
|
||||
})
|
||||
authServer.all('/drive/send-token', (req, res, next) => {
|
||||
authServer.all('*/send-token', (req, res, next) => {
|
||||
req.session.grant = { dynamic: { state: req.query.state || 'non-empty-value' } }
|
||||
next()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue