eykrehbein / strest

⚡️ CI-ready tests for REST APIs configured in YAML
MIT License
1.74k stars 59 forks source link

nunjucks escapes & characters #135

Closed philippevk closed 5 years ago

philippevk commented 5 years ago

Describe the bug Nunjucks escapes ampersand symbols by default, which makes it impossible to have query string elements in a rendered string (https://mozilla.github.io/nunjucks/api.html#autoescaping)

To Reproduce

Expected behavior

you can just pass autoescape: false to nunjucks.configure to disable this

jgroom33 commented 5 years ago

Thanks for identifying this.

This test is being added:

version: 2

requests:
  setParam:
    request:
      url: https://postman-echo.com/post
      method: POST
      postData:
        mimeType: application/json
        text:
          param: https://jsonplaceholder.typicode.com/posts?userId=1&id=3
    validate:
    - jsonpath: status
      expect: 200
  useParam:
    request:
      url: <$ setParam.content.data.param $>
      method: GET
    validate:
    - jsonpath: content.0.id
      expect: 3
jgroom33 commented 5 years ago

Resolved with release 2.4.1 Please confirm

philippevk commented 5 years ago

confirmed, thanks (and sorry for the long delay)