Skip to content

Commit

Permalink
Remove unnecessary test
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog committed May 26, 2024
1 parent 8fb5dfb commit 5fd3bc9
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions test/polymorphic_embed_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2282,23 +2282,6 @@ defmodule PolymorphicEmbedTest do
end)
end

test "returns type from changeset via custom type field" do
reminder_module = get_module(Reminder, :polymorphic)
attrs = %{"channel" => %{"my_type_field" => "sms"}}

changeset =
reminder_module
|> struct()
|> reminder_module.changeset(attrs)

safe_form_for(changeset, fn f ->
assert PolymorphicEmbed.HTML.Form.get_polymorphic_type(f, :channel) ==
:sms

text_input(f, :text)
end)
end

test "returns type from map with default type field (string)" do
reminder_module = get_module(Reminder, :polymorphic)
attrs = %{"channel2" => %{"__type__" => "email"}}
Expand Down

0 comments on commit 5fd3bc9

Please sign in to comment.