Skip to content

Commit

Permalink
Merge pull request #679 from stripe/brandur-minor-test-fixes
Browse files Browse the repository at this point in the history
Minor test fixes
  • Loading branch information
brandur-stripe authored Aug 30, 2018
2 parents 7331bf3 + 6ad182b commit 54b012c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/stripe/api_resource_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class NestedTestAPIResource < Stripe::APIResource
.with(query: { "expand" => ["customer"] })
.to_return(body: JSON.generate(charge_fixture))

ch = Stripe::Charge.retrieve(id: "ch_123", expand: :customer)
ch = Stripe::Charge.retrieve(id: "ch_123", expand: [:customer])
ch.refresh
end

Expand All @@ -99,7 +99,7 @@ class NestedTestAPIResource < Stripe::APIResource
.to_return(body: JSON.generate(customer_fixture))

customer = Stripe::Customer.retrieve("cus_123")
customer.sources.retrieve(id: "cc_test_card", expand: :customer)
customer.sources.retrieve(id: "cc_test_card", expand: [:customer])
end

context "when specifying per-object credentials" do
Expand Down Expand Up @@ -160,7 +160,7 @@ class NestedTestAPIResource < Stripe::APIResource
.with(query: { customer: "cus_123" })
.to_return(body: JSON.generate(data: [charge_fixture],
url: "/v1/charges"))
charges = Stripe::Invoice.list(customer: "cus_123")
charges = Stripe::Charge.list(customer: "cus_123")

stub_request(:get, "#{Stripe.api_base}/v1/charges")
.with(query: { customer: "cus_123", created: "123" })
Expand Down

0 comments on commit 54b012c

Please sign in to comment.