logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 24d66b60a0272ef4e78f2f9802682964059c44ce
parent 5c3a0dd26e8ba818388ca6965e71600fd2ec07a1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 31 May 2021 10:14:12 +0200

request_builder_test: mode :read got removed

Diffstat:

Mtest/pleroma/http/request_builder_test.exs44++++++++++++++++++++++++++------------------
1 file changed, 26 insertions(+), 18 deletions(-)

diff --git a/test/pleroma/http/request_builder_test.exs b/test/pleroma/http/request_builder_test.exs @@ -34,24 +34,32 @@ defmodule Pleroma.HTTP.RequestBuilderTest do describe "add_param/4" do test "add file parameter" do - %Request{ - body: %Tesla.Multipart{ - boundary: _, - content_type_params: [], - parts: [ - %Tesla.Multipart.Part{ - body: %File.Stream{ - line_or_bytes: 2048, - modes: [:raw, :read_ahead, :read, :binary], - path: "some-path/filename.png", - raw: true - }, - dispositions: [name: "filename.png", filename: "filename.png"], - headers: [] - } - ] - } - } = RequestBuilder.add_param(%Request{}, :file, "filename.png", "some-path/filename.png") + assert match?( + %Request{ + body: %Tesla.Multipart{ + boundary: _, + content_type_params: [], + parts: [ + %Tesla.Multipart.Part{ + body: %File.Stream{ + line_or_bytes: 2048, + modes: [:raw, :read_ahead, :binary], + path: "some-path/filename.png", + raw: true + }, + dispositions: [name: "filename.png", filename: "filename.png"], + headers: [] + } + ] + } + }, + RequestBuilder.add_param( + %Request{}, + :file, + "filename.png", + "some-path/filename.png" + ) + ) end test "add key to body" do