postman-code-generators icon indicating copy to clipboard operation
postman-code-generators copied to clipboard

Wrong Test Case output in Objective-C

Open ShauryaAg opened this issue 4 years ago • 3 comments

Describe the bug Objective-C unit test case Resolve URL (Quotes + Special Characters) Copy has output wherein it parse %26 as %2526. %26 is clearly a URL encoded & symbol, and hence it should be left as it is.

To Reproduce Steps to reproduce the behavior: Run npm test objective-c

Expected code snippet and corresponding request %26 is a URL encoded & symbol, and hence it should be left as it is.

Screenshots image

Additional context %26 and %2526 are two different URLs. %25 should only be used if the URL contains a % sign, not when its parsing an already URL encoded string.

Version of postman-code-generators/Postman app: Issue present in the commit: 31dc9f64295ec47b56c2912901eb39e5bdf067db

ShauryaAg avatar Jan 02 '21 18:01 ShauryaAg

Some unit test also do not URL encode ' (single-quotes character). ' character needs to be changed to %27 too

ShauryaAg avatar Jan 02 '21 19:01 ShauryaAg

@umeshp7 I have already made a PR #437 that corrects this issue.

ShauryaAg avatar Jan 04 '21 16:01 ShauryaAg

@ShauryaAg Yes! Thanks for reporting the issue and the contribution. We are assigning someone from the team also so that this is reviewed and merged soon. :)

umeshp7 avatar Jan 04 '21 17:01 umeshp7