webmock icon indicating copy to clipboard operation
webmock copied to clipboard

hash_including with Job stubbing.

Open abhishek-jadav98 opened this issue 2 years ago • 1 comments

hash_including is not working with Job stubbing. For example - I want to check if a particular key is present in the hash.

AbcJob.expects(:perform_later).with(
   has_entry("changes" => hash_including(
      "title" => ['', 'title_1, title_2']
   ).as_json
))

Here AbcJob has a few arguments and one of them is changes. Now changes field is a hash value and one of the key of hash is title. Due to some reason if cannot directly verify entire hash and hence using hash_including

abhishek-jadav98 avatar Aug 08 '23 13:08 abhishek-jadav98

@abhishek-jadav98 I'm not sure how this issue is related to WebMock. How is WebMock affecting that?

bblimke avatar Aug 19 '23 13:08 bblimke