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

Request feature to verify mock is called by exact number of times and in certain sequence? #54

Open
kungfucop opened this issue Apr 28, 2020 · 2 comments

Comments

@kungfucop
Copy link

Hi, for function to test like following:

fn handle_response(response:Response) {
  save_db(response.get_users());
  let unread_count = read_unread_from_db();
  send_push_notification(unread_count);
}

I'd like to make sure send_push_notification did get called with the desired count in the unit test. How could I do this?

Thanks a lot!

@strottos
Copy link

strottos commented Mar 1, 2021

I would very much like to see this also. Mocktopus is great at preventing some things having to be called but it would be v nice to be able to verify the calls being made to the functions.

@gregdhill
Copy link
Collaborator

Please see the discussion in #33, recommendations / contributions would be appreciated!

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

3 participants