-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#496 One time links should be generated by our url shortener #615
Changes from 6 commits
c0908d1
bbdfa66
9ff1195
d5ff8c1
ff48f19
35b45bc
6f3fcd6
df8a4ab
3b33704
cc25fd8
826db44
a203542
38148f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ describe('generateShareLink', () => { | |
const link = generateShareLink(action, params) | ||
|
||
// Then | ||
expect(link).toEqual(`${Config.publicUrl}/AppNavigation/Dashboard/Home?key=value`) | ||
expect(link).toEqual(`${Config.sendUrl}?key=value`) | ||
}) | ||
|
||
it(`should return link generated from receive action`, () => { | ||
|
@@ -61,7 +61,7 @@ describe('generateShareLink', () => { | |
const link = generateShareLink(action, params) | ||
|
||
// Then | ||
expect(link).toEqual(`${Config.publicUrl}/AppNavigation/Dashboard/Send?key=value`) | ||
expect(link).toEqual(`${Config.receiveUrl}?key=value`) | ||
}) | ||
|
||
it(`should return link generated from send action, with several query params`, () => { | ||
|
@@ -79,7 +79,7 @@ describe('generateShareLink', () => { | |
|
||
// Then | ||
expect(link).toEqual( | ||
`${Config.publicUrl}/AppNavigation/Dashboard/Home?key=value&key2=value2&key3=value3&key4=value4` | ||
`${Config.sendUrl}?key=value&key2=value2&key3=value3&key4=value4` | ||
) | ||
}) | ||
|
||
|
@@ -89,9 +89,9 @@ describe('generateShareLink', () => { | |
const params = { key: 'value with spaces' } | ||
|
||
// When | ||
const link = generateShareLink(action, params) | ||
const link = encodeURI(generateShareLink(action, params)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The link that we generate should be already encoded. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The generateShareObject method does encodeURI that breaks the reference in Share Object . But most likely it is necessary to remove reuse in the generateShareObject method There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
// Then | ||
expect(link).toEqual(`${Config.publicUrl}/AppNavigation/Dashboard/Home?key=value%20with%20spaces`) | ||
expect(link).toEqual(`${Config.sendUrl}?key=value%20with%20spaces`) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is defined above in this file