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

hash_including with Job stubbing. #1032

Open
abhishek-jadav98 opened this issue Aug 8, 2023 · 1 comment
Open

hash_including with Job stubbing. #1032

abhishek-jadav98 opened this issue Aug 8, 2023 · 1 comment

Comments

@abhishek-jadav98
Copy link

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

@bblimke
Copy link
Owner

bblimke commented Aug 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants