@@ -42,15 +42,6 @@ defmodule TestDispatch do
4242 def dispatch_form ( conn , entity_or_test_selector , nil ) ,
4343 do: dispatch_form ( conn , % { } , entity_or_test_selector )
4444
45- defp _dispatch_form ( conn , form , selector_tuple , attrs ) do
46- form
47- |> find_inputs ( selector_tuple )
48- |> Enum . map ( & input_to_tuple ( & 1 , selector_tuple ) )
49- |> update_input_values ( attrs )
50- |> prepend_entity ( selector_tuple )
51- |> send_to_action ( form , conn )
52- end
53-
5445 @ doc """
5546 Works like `dispatch/3`. The test_selector is used to find the right form and the
5647 entity is used to find and fill the inputs correctly.
@@ -68,6 +59,15 @@ defmodule TestDispatch do
6859 def submit_form ( conn , attrs \\ % { } , entity_or_test_selector \\ nil ) ,
6960 do: dispatch_form ( conn , attrs , entity_or_test_selector )
7061
62+ defp _dispatch_form ( conn , form , selector_tuple , attrs ) do
63+ form
64+ |> find_inputs ( selector_tuple )
65+ |> Enum . map ( & input_to_tuple ( & 1 , selector_tuple ) )
66+ |> update_input_values ( attrs )
67+ |> prepend_entity ( selector_tuple )
68+ |> send_to_action ( form , conn )
69+ end
70+
7171 @ doc """
7272 Works like `submit_form/3`. The test_selector is used to find the right form and the
7373 entity is used to find and fill the inputs correctly.
0 commit comments