-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Track and record Webhook Events #11434
Conversation
Changes preview: |
Co-authored-by: Damian Legawiec <damian@sparksolutions.co>
Co-authored-by: Damian Legawiec <damian@sparksolutions.co>
before do | ||
allow(subject).to receive(:request).and_return(request_double) | ||
allow(request_double).to receive(:unprocessable_uri?).and_return(true) | ||
allow(request_double).to( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastian-palma rather then testing receiving methods let's test if the record was created and persisted properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damianlegawiec this part isn't testing the subject does receive those method calls, but it's stubbing the respective values for the events creation, which is checked here. As those values depend on the result of performing a HTTP request the whole public interface of MakeRequest has been stubbed through the subject. If we don't do that, we'd be testing the internals of MakeRequest, which has its own examples.
https://spark-solutions.atlassian.net/browse/SD-1498