Skip to content

Commit

Permalink
Remove params_to_stripe
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsmith committed Oct 24, 2016
1 parent ddbaca6 commit 44b4006
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
4 changes: 0 additions & 4 deletions lib/code_corps/stripe/adapters/stripe_account.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ defmodule CodeCorps.Stripe.Adapters.StripeAccount do
def params_from_stripe(%{} = stripe_map) do
stripe_map |> rename("id", "id_from_stripe")
end

def params_to_stripe(%{} = ecto_map) do
ecto_map |> rename("id_from_stripe", "id")
end
end
8 changes: 1 addition & 7 deletions test/lib/code_corps/stripe/adapters/stripe_account_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule CodeCorps.Stripe.Adapters.StripeAccountTest do
use ExUnit.Case, async: true

import CodeCorps.Stripe.Adapters.StripeAccount, only: [params_to_stripe: 1, params_from_stripe: 1]
import CodeCorps.Stripe.Adapters.StripeAccount, only: [params_from_stripe: 1]

@stripe_map %{"id" => "str_123", "foo" => "bar"}
@local_map %{"id_from_stripe" => "str_123", "foo" => "bar"}
Expand All @@ -11,10 +11,4 @@ defmodule CodeCorps.Stripe.Adapters.StripeAccountTest do
assert @stripe_map |> params_from_stripe == @local_map
end
end

describe "params_to_stripe/1" do
test "converts from local to stripe map properly" do
assert @local_map |> params_to_stripe == @stripe_map
end
end
end

0 comments on commit 44b4006

Please sign in to comment.