Put a file in your test directory somewhere (maybe test/fixtures
) then use the Plug.Upload struct:
upload = %Plug.Upload{path: "test/fixtures/example.png", filename: "example.png"}
conn() |> post("/api/v1/originals", %{ :image => upload })
Put a file in your test directory somewhere (maybe test/fixtures
) then use the Plug.Upload struct:
upload = %Plug.Upload{path: "test/fixtures/example.png", filename: "example.png"}
conn() |> post("/api/v1/originals", %{ :image => upload })