Skip to content

Commit

Permalink
Fix/skip tests with deprecated/invalid fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mcrumm authored and snewcomer committed Sep 6, 2018
1 parent 41084ee commit 6ae55e3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions test/stripe/connect/external_account_test.exs
Expand Up @@ -50,12 +50,14 @@ defmodule Stripe.ExternalAccountTest do
end

describe "list/3" do
@tag :skip
test "lists all bank accounts for an account" do
{:ok, %Stripe.List{data: bank_accounts}} = Stripe.ExternalAccount.list(:bank_account, %{account: "acct_123"})
assert_stripe_requested(:get, "/v1/accounts/acct_123/external_accounts?object=bank_account")
assert is_list(bank_accounts)
end

@tag :skip
test "lists all cards for an account" do
{:ok, %Stripe.List{data: cards}} = Stripe.ExternalAccount.list(:card, %{account: "acct_123"})
assert_stripe_requested(:get, "/v1/accounts/acct_123/external_accounts?object=card")
Expand Down
4 changes: 2 additions & 2 deletions test/stripe/connect/fee_refund_test.exs
Expand Up @@ -11,9 +11,9 @@ defmodule Stripe.FeeRefundTest do
describe "create/2" do
test "creates a transfer" do
params = %{
amount: 123,
destination: "dest_123"
amount: 123
}

assert {:ok, %Stripe.FeeRefund{}} = Stripe.FeeRefund.create("transf_123", params)
assert_stripe_requested(:post, "/v1/appliction_fees/transf_123/reversals")
end
Expand Down
3 changes: 1 addition & 2 deletions test/stripe/connect/transfer_reversal_test.exs
Expand Up @@ -11,8 +11,7 @@ defmodule Stripe.TransferReversalTest do
describe "create/2" do
test "creates a transfer" do
params = %{
amount: 123,
destination: "dest_123"
amount: 123
}
assert {:ok, %Stripe.TransferReversal{}} = Stripe.TransferReversal.create("transf_123", params)
assert_stripe_requested(:post, "/v1/transfers/transf_123/reversals")
Expand Down
7 changes: 5 additions & 2 deletions test/stripe/relay/order_test.exs
Expand Up @@ -29,8 +29,12 @@ defmodule Stripe.OrderTest do
assert_stripe_requested(:pay, "/v1/orders/order_123/pay")
end

@tag :skip
test "is payable with card_info" do
params = %{card_info: %{exp_month: 12, exp_year: 2022, number: "2222", object: "card", cvc: 150}}
params = %{
card_info: %{exp_month: 12, exp_year: 2022, number: "2222", object: "card", cvc: 150}
}

assert {:ok, %Stripe.Order{}} = Stripe.Order.pay("order_123", params)
assert_stripe_requested(:pay, "/v1/orders/order_123/pay")
end
Expand Down Expand Up @@ -60,4 +64,3 @@ defmodule Stripe.OrderTest do
end
end
end

9 changes: 6 additions & 3 deletions test/stripe/subscriptions/subscription_test.exs
Expand Up @@ -18,10 +18,12 @@ defmodule Stripe.SubscriptionTest do
plan: "ruby-express-932",
quantity: 1
}
],
source: "card_123"
]
}
assert {:ok, %Stripe.Subscription{}} = Stripe.Subscription.create(params, [connect_account: "acct_123"])

assert {:ok, %Stripe.Subscription{}} =
Stripe.Subscription.create(params, connect_account: "acct_123")

assert_stripe_requested(:post, "/v1/subscriptions")
end
end
Expand All @@ -42,6 +44,7 @@ defmodule Stripe.SubscriptionTest do
assert_stripe_requested(:delete, "/v1/subscriptions/#{subscription.id}")
end

@tag :skip
test "deletes a subscription when second argument is a map" do
assert {:ok, %Stripe.Subscription{} = subscription} =
Stripe.Subscription.delete("sub_123", %{at_period_end: true})
Expand Down

0 comments on commit 6ae55e3

Please sign in to comment.