mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-06-04 00:01:12 -04:00
Do not rely on fixtures for login_links as it's not always here.
This commit is contained in:
parent
330763aa02
commit
27dca775c7
@ -6,7 +6,15 @@ module Stripe
|
|||||||
|
|
||||||
setup do
|
setup do
|
||||||
account_fixture = API_FIXTURES.fetch(:account)
|
account_fixture = API_FIXTURES.fetch(:account)
|
||||||
@account = Stripe::Account.retrieve(account_fixture[:id])
|
account_fixture = account_fixture.merge(
|
||||||
|
'login_links' => {
|
||||||
|
'data' => [],
|
||||||
|
'has_more' => false,
|
||||||
|
'object' => 'list',
|
||||||
|
'url' => "/v1/accounts/#{account_fixture[:id]}/login_links"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@account = Stripe::Account.construct_from(account_fixture)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "not be retrievable" do
|
should "not be retrievable" do
|
||||||
@ -18,6 +26,7 @@ module Stripe
|
|||||||
should "be creatable" do
|
should "be creatable" do
|
||||||
stub_request(:post, "#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links").
|
stub_request(:post, "#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links").
|
||||||
to_return(body: JSON.generate(FIXTURE))
|
to_return(body: JSON.generate(FIXTURE))
|
||||||
|
|
||||||
login_link = @account.login_links.create
|
login_link = @account.login_links.create
|
||||||
assert_requested :post,
|
assert_requested :post,
|
||||||
"#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links"
|
"#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user