Skip to content

Commit

Permalink
Fix Stripe.File.create (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanosman authored May 7, 2024
1 parent f128da6 commit a9ce057
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule Stripe.Mixfile do
defp env do
[
api_base_url: "https://api.stripe.com",
api_upload_url: "https://files.stripe.com/v1/",
api_upload_url: "https://files.stripe.com",
pool_options: [
timeout: 5_000,
max_connections: 10
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/upload.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# file to upload
3 changes: 1 addition & 2 deletions test/stripe/core_resources/file_upload_test.exs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
defmodule Stripe.FileTest do
use Stripe.StripeCase, async: true

@tag :skip
describe "create/2" do
test "creates a file" do
assert {:ok, %Stripe.File{}} =
Stripe.File.create(%{
file: "@/path/to/a/file.jpg",
file: Path.join(__DIR__, "../../fixtures/upload.txt"),
purpose: "dispute_evidence"
})

Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ unless System.get_env("SKIP_STRIPE_MOCK_RUN") do
end

api_base_url = System.get_env("STRIPE_API_BASE_URL") || "http://localhost:12111"
api_upload_url = System.get_env("STRIPE_API_UPLOAD_URL") || "http://localhost:12112/v1/"
api_upload_url = System.get_env("STRIPE_API_UPLOAD_URL") || "http://localhost:12111"

Application.put_env(:stripity_stripe, :api_base_url, api_base_url)
Application.put_env(:stripity_stripe, :api_upload_url, api_upload_url)
Expand Down

0 comments on commit a9ce057

Please sign in to comment.