Skip to content
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

Respect the params_encoder in Faraday::Adapter::Test #1316

Merged
merged 3 commits into from Aug 30, 2021

Commits on Aug 28, 2021

  1. Respect the params_encoder in Faraday::Adapter::Test

    Faraday provides a feature to let its callers configure
    `params_encoder`, but `Faraday::Adapter::Test` had always created test
    stubs with `#parse_nested_query` (`NestedParamsEncoder`). So, we had not
    able to test such a connection with `Faraday::Adapter::Test`. This might
    be inconvenient for users who want to use non-default `params_encoder`,
    such as `Faraday::FlatParamsEncoder`.
    
    This patch changed the adapter to use the same `params_encoder` as its
    connection in order to solve the problem.
    yykamei committed Aug 28, 2021
    Copy the full SHA
    9bfb839 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2021

  1. Update examples/client_spec.rb

    Co-authored-by: Matt <iMacTia@users.noreply.github.com>
    yykamei and iMacTia committed Aug 29, 2021
    Copy the full SHA
    6896ccc View commit details
    Browse the repository at this point in the history
  2. Set env[:params] and env.request.params_encoder in advance

    In order to avoid dups of `params_encoder.decode`, set `env[:params]`
    with the vaule generated by `params_encoder.decode` before calling
    `stubs.match`.
    yykamei committed Aug 29, 2021
    Copy the full SHA
    91689f0 View commit details
    Browse the repository at this point in the history