Skip to content

Commit

Permalink
Include file_link_data parameter in file creation test
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Apr 5, 2019
1 parent 796f4bd commit 8329ffc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions test/stripe/file_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class FileTest < Test::Unit::TestCase
should "be creatable with a File" do
file = Stripe::File.create(
purpose: "dispute_evidence",
file: ::File.new(__FILE__)
file: ::File.new(__FILE__),
file_link_data: {create: true},
)
assert_requested :post, "#{Stripe.uploads_base}/v1/files"
assert file.is_a?(Stripe::File)
Expand All @@ -44,7 +45,8 @@ class FileTest < Test::Unit::TestCase

file = Stripe::File.create(
purpose: "dispute_evidence",
file: tempfile
file: tempfile,
file_link_data: {create: true},
)
assert_requested :post, "#{Stripe.uploads_base}/v1/files"
assert file.is_a?(Stripe::File)
Expand All @@ -53,7 +55,8 @@ class FileTest < Test::Unit::TestCase
should "be creatable with Faraday::UploadIO" do
file = Stripe::File.create(
purpose: "dispute_evidence",
file: Faraday::UploadIO.new(::File.new(__FILE__), nil)
file: Faraday::UploadIO.new(::File.new(__FILE__), nil),
file_link_data: {create: true},
)
assert_requested :post, "#{Stripe.uploads_base}/v1/files"
assert file.is_a?(Stripe::File)
Expand Down
9 changes: 6 additions & 3 deletions test/stripe/file_upload_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class FileUploadTest < Test::Unit::TestCase
should "be creatable with a File" do
file = Stripe::FileUpload.create(
purpose: "dispute_evidence",
file: ::File.new(__FILE__)
file: ::File.new(__FILE__),
file_link_data: {create: true},
)
assert_requested :post, "#{Stripe.uploads_base}/v1/files"
assert file.is_a?(Stripe::FileUpload)
Expand All @@ -47,7 +48,8 @@ class FileUploadTest < Test::Unit::TestCase

file = Stripe::FileUpload.create(
purpose: "dispute_evidence",
file: tempfile
file: tempfile,
file_link_data: {create: true},
)
assert_requested :post, "#{Stripe.uploads_base}/v1/files"
assert file.is_a?(Stripe::FileUpload)
Expand All @@ -56,7 +58,8 @@ class FileUploadTest < Test::Unit::TestCase
should "be creatable with Faraday::UploadIO" do
file = Stripe::FileUpload.create(
purpose: "dispute_evidence",
file: Faraday::UploadIO.new(::File.new(__FILE__), nil)
file: Faraday::UploadIO.new(::File.new(__FILE__), nil),
file_link_data: {create: true},
)
assert_requested :post, "#{Stripe.uploads_base}/v1/files"
assert file.is_a?(Stripe::FileUpload)
Expand Down

0 comments on commit 8329ffc

Please sign in to comment.