Hey guys, I’m new to Elixir, trying to merge my branch into a large code base but the Travis build fails and gives me this error:
1231** (CompileError) test/support/setup_helpers.ex:149: undefined function add_truck_load/3
1232 (elixir 1.11.2) src/elixir_locals.erl:114: anonymous fn/3 in :elixir_locals.ensure_no_undefined_local/3
This is line 149 where I call the add_truck_load/3 function:
add_truck_load(attrs, @unload_truck_load_attrs, [:all]
However, I do define this function earlier in the file:
def add_truck_load(attrs, fields_to_update \\ %{}) do
attrs
|> Enum.into(%{})
|> add_missing_fields(@dispatch_fields)
|> add_missing_fields(@driver_fields)
|> add_missing_fields(@create_truck_load_fields)
|> add_pending_driver()
|> create_order()
|> elem(1)
|> Repo.preload(:fulfillments)
|> Map.get(:fulfillments)
|> List.first()
|> Map.get(:id)
|> DriverFulfillments.accept(nil)
|> elem(1)
|> Map.get(:truck_load)
|> TruckLoads.update_truck_load(Enum.into(fields_to_update, %{}), nil)
|> elem(1)
|> Map.get(:id)
|> TruckLoads.get_truck_load!()
end
Is the issue because of the parameters I’m passing in?
Thanks so much!!