Skip to content

Commit

Permalink
Fix object module lookup for Test Clock (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
clandry94 authored Jan 26, 2024
1 parent bb129f8 commit 2dbbd54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stripe/util.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule Stripe.Util do
def atomize_key(k), do: k

@spec object_name_to_module(String.t()) :: module
def object_name_to_module("test_helpers.test_clock"), do: Stripe.TestClock
def object_name_to_module("test_helpers.test_clock"), do: Stripe.TestHelpers.TestClock

def object_name_to_module(object_name) do
module_parts =
Expand Down
1 change: 1 addition & 0 deletions test/stripe/util_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ defmodule Stripe.UtilTest do
assert object_name_to_module("terminal.reader") == Stripe.Terminal.Reader
assert object_name_to_module("terminal.location") == Stripe.Terminal.Location
assert object_name_to_module("terminal.connection_token") == Stripe.Terminal.ConnectionToken
assert object_name_to_module("test_helpers.test_clock") == Stripe.TestHelpers.TestClock
assert object_name_to_module("usage_record") == Stripe.UsageRecord
assert object_name_to_module("usage_record_summary") == Stripe.UsageRecordSummary
end
Expand Down

0 comments on commit 2dbbd54

Please sign in to comment.