Add option to modify HTTP pool size
[akkoma] / test / pleroma / upload_test.exs
index f1ab82a57441b00ad37ec8e8ffcb23504ece8719..8f242630ffbaecfb2d12afaea429cb7048b0a27f 100644 (file)
@@ -49,20 +49,22 @@ defmodule Pleroma.UploadTest do
     test "it returns file" do
       File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg")
 
-      assert Upload.store(@upload_file) ==
-               {:ok,
-                %{
-                  "name" => "image.jpg",
-                  "type" => "Document",
-                  "mediaType" => "image/jpeg",
-                  "url" => [
-                    %{
-                      "href" => "http://localhost:4001/media/post-process-file.jpg",
-                      "mediaType" => "image/jpeg",
-                      "type" => "Link"
-                    }
-                  ]
-                }}
+      assert {:ok, result} = Upload.store(@upload_file)
+
+      assert result ==
+               %{
+                 "id" => result["id"],
+                 "name" => "image.jpg",
+                 "type" => "Document",
+                 "mediaType" => "image/jpeg",
+                 "url" => [
+                   %{
+                     "href" => "http://localhost:4001/media/post-process-file.jpg",
+                     "mediaType" => "image/jpeg",
+                     "type" => "Link"
+                   }
+                 ]
+               }
 
       Task.await(Agent.get(TestUploaderSuccess, fn task_pid -> task_pid end))
     end