Unit test and runtime behaviour of controller differ

Found the issue. You were absolutely correct in your assumption about the controller being odd. For whatever reason, in the erroring controller I had

def update(conn, job_control_params) do
instead of
def update(conn, %{"job_control" => job_control_params}) do

Same for the create function. Not sure why it was like this but I’ve fixed it now and the tests pass.

Thanks for the help!