ipfs: replacing single quotes with double quotes

This commit is contained in:
Claudio Maradonna 2022-07-08 10:06:46 +02:00
parent 5e097eb91d
commit 21d9091f5e
No known key found for this signature in database
GPG Key ID: 0CBA58694C5680D9
1 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ test "returns error", %{file_upload: file_upload} do
test "returns error if JSON decode fails", %{file_upload: file_upload} do
with_mock Pleroma.HTTP, [],
post: fn "http://localhost:5001/api/v0/add", mp, [], params: ["cid-version": "1"] ->
{:ok, %Tesla.Env{status: 200, body: 'invalid'}}
{:ok, %Tesla.Env{status: 200, body: "invalid"}}
end do
assert capture_log(fn ->
assert IPFS.put_file(file_upload) == {:error, "JSON decode failed"}
@ -112,7 +112,7 @@ test "returns error if JSON decode fails", %{file_upload: file_upload} do
test "returns error if JSON body doesn't contain Hash key", %{file_upload: file_upload} do
with_mock Pleroma.HTTP, [],
post: fn "http://localhost:5001/api/v0/add", mp, [], params: ["cid-version": "1"] ->
{:ok, %Tesla.Env{status: 200, body: '{"key": "value"}'}}
{:ok, %Tesla.Env{status: 200, body: "{\"key\": \"value\"}"}}
end do
assert IPFS.put_file(file_upload) == {:error, "JSON doesn't contain Hash key"}
end