mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-05-31 00:00:37 -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
|
||||
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
|
||||
|
||||
should "not be retrievable" do
|
||||
@ -18,6 +26,7 @@ module Stripe
|
||||
should "be creatable" do
|
||||
stub_request(:post, "#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links").
|
||||
to_return(body: JSON.generate(FIXTURE))
|
||||
|
||||
login_link = @account.login_links.create
|
||||
assert_requested :post,
|
||||
"#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links"
|
||||
|
Loading…
x
Reference in New Issue
Block a user