diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-05 17:31:06 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-05 17:31:06 +0300 |
commit | f0753eed0fdddd30e127213c89a118dd2e087dc9 (patch) | |
tree | 6cf9a2d9983fc42d11bb476aa2ba247b0b9c3338 /test/web/activity_pub/relay_test.exs | |
parent | eb324467d9c5c761a776ffc98347246c61ad02ae (diff) | |
download | pleroma-f0753eed0fdddd30e127213c89a118dd2e087dc9.tar.gz pleroma-f0753eed0fdddd30e127213c89a118dd2e087dc9.zip |
removing try block in tesla request
added mocks for tests which fail with Tesla.Mock.Error
Diffstat (limited to 'test/web/activity_pub/relay_test.exs')
-rw-r--r-- | test/web/activity_pub/relay_test.exs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/web/activity_pub/relay_test.exs b/test/web/activity_pub/relay_test.exs index e3115dcd8..12bf90d90 100644 --- a/test/web/activity_pub/relay_test.exs +++ b/test/web/activity_pub/relay_test.exs @@ -89,6 +89,11 @@ defmodule Pleroma.Web.ActivityPub.RelayTest do } ) + Tesla.Mock.mock(fn + %{method: :get, url: "http://mastodon.example.org/eee/99541947525187367"} -> + %Tesla.Env{status: 500, body: ""} + end) + assert capture_log(fn -> assert Relay.publish(activity) == {:error, nil} end) =~ "[error] error: nil" |