ripe-tech / ripe-sdk

The public Javascript SDK for RIPE Core
https://www.platforme.com
Apache License 2.0
8 stars 4 forks source link

Report URLs methods not accepting params #381

Closed NFSS10 closed 2 years ago

NFSS10 commented 2 years ago

Description

The methods _getOrderReportURL, _getOrderReportPDFURL and _getOrderReportPNGURL aren't correctly handling params as they are being ignored and not properly added to the URL. The methods sould be fixed and the tests updated to catch those cases.

Expected vs. Observed

- -
Expected Calling _getOrderReportPNGURL(1234, "secret-key", { params: { size: 100 } }); should return orders/1234/report.png?key=secret-key&size=100
Observed Calling _getOrderReportPNGURL(1234, "secret-key", { params: { size: 100 } }); returns orders/1234/report.png?key=secret-key

Repro Steps

  1. Use one of those methods with params passed to options
  2. Check that the params are ignored

Environment

Key Value
Device Any
Operating System Any
Browser Any
dsafonso commented 2 years ago

Test OK :+1: image