-
Notifications
You must be signed in to change notification settings - Fork 183
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
Webhook create method returning false negative #111
Comments
Checked out the code and thought I saw the reason: def create(domain, action, url = '')
res = @client.post("domains/#{domain}/webhooks", id: action, url: url)
res.to_h['webhook'] == url && res.to_h[message] == 'Webhook has been created'
end According to the API docs at https://documentation.mailgun.com/en/latest/api-webhooks.html#examples the 2nd check should be res.to_h['webhook']['url']== url && res.to_h[message] == 'Webhook has been created' The VCR cassette is correct, but the 'webhook_spec' success is a bit misleading because it's not testing the webhook wrapper. It would be best to test the webhook spec directly, but I'm guessing this is more of a broader issue :) I'll submit a PR with the fix |
Hey, thanks for the PR - I've merged it! I'll try and cut another release in a few days when I get some time to tackle some other bugs as well. Thanks a bunch! |
Thanks, @pirogoeth! If I get time I'd love to help build out more of the library as we're going to be using it more heavily at GymLeads going forward 👍 |
@abury That's great to hear! It would be awesome to have you on-board. |
Hey guys/gals
Really enjoying the updated library! Thanks for your time building it :)
Found a small (potential) bug. I'm calling create on the webhook client and it's working (verified the webhook is created) however it's returning false without throwing any exception.
If I get time I'll look into it and submit a PR, but for now just thought I'd raise it :)
Thanks!
Aron
The text was updated successfully, but these errors were encountered: