I’m trying to set the header with an addition value in a phoenix unit (integration) test:
@tag integration: true test "should record the incoming request made to forwarding service" do conn_with_api_header = build_conn() |> Plug.Conn.put_req_header("x-mashape-key", "some_test_key" ) conn = post(conn_with_api_header, "/api/cards") end
When I run the test I’m getting the following error:
** (ArgumentError) argument error
code: conn = post(conn_with_api_header, “/api/cards”)
Does anyone know how to set or add entries to the header when testing endpoints? I didn’t see anything in the docs that allows this option.