Skip to content

Commit

Permalink
Merge pull request #747 from stripe/remi-add-checkout-session-retrieve
Browse files Browse the repository at this point in the history
Add support for retrieving a Checkout Session
  • Loading branch information
remi-stripe authored Mar 18, 2019
2 parents 67edf85 + de204dd commit 26ac126
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sudo: false
env:
global:
# If changing this number, please also change it in `test/test_helper.rb`.
- STRIPE_MOCK_VERSION=0.47.0
- STRIPE_MOCK_VERSION=0.49.0

cache:
directories:
Expand Down
6 changes: 6 additions & 0 deletions test/stripe/checkout/session_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ class SessionTest < Test::Unit::TestCase
assert_requested :post, "#{Stripe.api_base}/v1/checkout/sessions"
assert session.is_a?(Stripe::Checkout::Session)
end

should "be retrievable" do
charge = Stripe::Checkout::Session.retrieve("cs_123")
assert_requested :get, "#{Stripe.api_base}/v1/checkout/sessions/cs_123"
assert charge.is_a?(Stripe::Checkout::Session)
end
end
end
end
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require ::File.expand_path("../stripe_mock", __FILE__)

# If changing this number, please also change it in `.travis.yml`.
MOCK_MINIMUM_VERSION = "0.47.0".freeze
MOCK_MINIMUM_VERSION = "0.49.0".freeze
MOCK_PORT = Stripe::StripeMock.start

# Disable all real network connections except those that are outgoing to
Expand Down

0 comments on commit 26ac126

Please sign in to comment.