From af3931f9c00f4d520697243fbac4c1d7125418ee Mon Sep 17 00:00:00 2001 From: Eduardo Gurgel Date: Thu, 1 Sep 2016 22:12:52 +1200 Subject: [PATCH] Add multipart upload test --- test/httpoison_test.exs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/httpoison_test.exs b/test/httpoison_test.exs index d42874f..4307284 100644 --- a/test/httpoison_test.exs +++ b/test/httpoison_test.exs @@ -135,6 +135,11 @@ defmodule HTTPoisonTest do assert is_list(headers) end + test "multipart upload" do + response = HTTPoison.post("localhost:8080/post", {:multipart, [{:file, "test/test_helper.exs"}, {"name", "value"}]}) + assert_response(response) + end + defp assert_response({:ok, response}, function \\ nil) do assert is_list(response.headers) assert response.status_code == 200