Answer the question
In order to leave comments, you need to log in
How to check if a request was sent to an external service?
Hello.
There is a function that sends an alert to an external service. How can you check in an rspec test that this function has been called? Naturally, I can change the body of the function, the actual sending of the notification is already turned off by checking for Rails.env.test?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Thank you, the answer has been found.
https://relishapp.com/rspec/rspec-mocks/docs/basic...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question