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

Fixes tests for Stripe 5.19.0 #133

Merged
merged 1 commit into from May 12, 2020
Merged

Conversation

gaffneyc
Copy link
Contributor

As of 5.19.0, the compute_signature method was made public and they
split the timestamp into a separate param (which must be a Time). This
version checks compute_signature based on the number of params it takes
since doing a version check felt odd. Now that it is public, the method
shouldn't change it's API.

The build is currently failing with errors like these:

  8) StripeEvent::WebhookController with multiple signing secrets succeeds with valid signature from first secret
     Failure/Error: signature = Stripe::Webhook::Signature.send(:compute_signature, "#{timestamp}.#{payload}", secret)

     ArgumentError:
       wrong number of arguments (given 2, expected 3)
     # ./spec/controllers/webhook_controller_spec.rb:16:in `generate_signature'
     # ./spec/controllers/webhook_controller_spec.rb:28:in `webhook_with_signature'
     # ./spec/controllers/webhook_controller_spec.rb:117:in `block (3 levels) in <top (required)>'

1: stripe/stripe-ruby#915

As of 5.19.0, the compute_signature method was made public and they
split the timestamp into a separate param (which must be a Time). This
version checks compute_signature based on the number of params it takes
since doing a version check felt odd. Now that it is public, the method
shouldn't change it's API.

1: stripe/stripe-ruby#915
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 99.099% when pulling 3aea3a0 on gaffneyc:stripe-5-19-0 into 31d759d on integrallis:master.

@rmm5t rmm5t merged commit fee9cd6 into integrallis:master May 12, 2020
@rmm5t
Copy link
Member

rmm5t commented May 12, 2020

Thank you!

@gaffneyc gaffneyc deleted the stripe-5-19-0 branch May 12, 2020 17:20
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

Successfully merging this pull request may close these issues.

None yet

3 participants