OHHTTPStubs icon indicating copy to clipboard operation
OHHTTPStubs copied to clipboard

Added `hasJsonBody(_:)` matcher for array

Open 417-72KI opened this issue 3 years ago • 0 comments

Checklist

  • [x] I've checked that all new and existing tests pass
  • [x] I've updated the documentation if necessary
  • [x] I've added an entry in the CHANGELOG to credit myself

Description

I've added an overloaded matcher hasJsonBody that tests whether the NSURLRequest body contains a JSON array with the values on same order.

Motivation and Context

There is a matcher hasJsonBody for a JSON object ( created on #265 ). Unfortunately, it cannot be used when root of an object is an array (e.g. ["foo", "bar"]).

417-72KI avatar Jul 09 '21 08:07 417-72KI