X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fhttp_sigs%2Fhttp_sig_test.exs;h=74d86a9e1a8ddaa1280fdd65260e56c459e75fc0;hb=816db3f494c6fcc60d0a700dfc473a9cc49c84a0;hp=b2bf8d61b3b5c64bb095722eb7243d53f54322b8;hpb=368e085144cc3bea501dc14a783f32cd696cb3af;p=akkoma diff --git a/test/web/http_sigs/http_sig_test.exs b/test/web/http_sigs/http_sig_test.exs index b2bf8d61b..74d86a9e1 100644 --- a/test/web/http_sigs/http_sig_test.exs +++ b/test/web/http_sigs/http_sig_test.exs @@ -4,9 +4,12 @@ defmodule Pleroma.Web.HTTPSignaturesTest do use Pleroma.DataCase alias Pleroma.Web.HTTPSignatures import Pleroma.Factory + import Tesla.Mock - @private_key hd(:public_key.pem_decode(File.read!("test/web/http_sigs/priv.key"))) - |> :public_key.pem_entry_decode() + setup do + mock(fn env -> apply(HttpRequestMock, :request, [env]) end) + :ok + end @public_key hd(:public_key.pem_decode(File.read!("test/web/http_sigs/pub.key"))) |> :public_key.pem_entry_decode() @@ -20,8 +23,6 @@ defmodule Pleroma.Web.HTTPSignaturesTest do "content-length" => "18" } - @body "{\"hello\": \"world\"}" - @default_signature """ keyId="Test",algorithm="rsa-sha256",signature="jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9HpFQlG7N4YcJPteKTu4MWCLyk+gIr0wDgqtLWf9NLpMAMimdfsH7FSWGfbMFSrsVTHNTk0rK3usrfFnti1dxsM4jl0kYJCKTGI/UWkqiaxwNiKqGcdlEDrTcUhhsFsOIo8VhddmZTZ8w=" """