postmanlabs / postman-code-generators

Common repository for all code generators shipped with Postman
Apache License 2.0
988 stars 348 forks source link

Wrong Test Case output in Objective-C #438

Open ShauryaAg opened 3 years ago

ShauryaAg commented 3 years ago

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 commented 3 years ago

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

ShauryaAg commented 3 years ago

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

umeshp7 commented 3 years ago

@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. :)