diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-14 18:29:51 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-14 18:29:51 +0300 |
commit | d7457c9165b83c0f1514cf0532b5a8bdc515ea02 (patch) | |
tree | 65209338d595c55397f85ad2295bc48b778b820e /test/web/activity_pub/relay_test.exs | |
parent | 0bd2b85edbf3b7062570778649cf2b77cc7a0bce (diff) | |
parent | 3ae448b592214b43af1d079c997c6f6b91d31aeb (diff) | |
download | pleroma-d7457c9165b83c0f1514cf0532b5a8bdc515ea02.tar.gz pleroma-d7457c9165b83c0f1514cf0532b5a8bdc515ea02.zip |
Merge branch 'develop' into refactor/subscription
Diffstat (limited to 'test/web/activity_pub/relay_test.exs')
-rw-r--r-- | test/web/activity_pub/relay_test.exs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/web/activity_pub/relay_test.exs b/test/web/activity_pub/relay_test.exs index 4f7d592a6..9db4255d8 100644 --- a/test/web/activity_pub/relay_test.exs +++ b/test/web/activity_pub/relay_test.exs @@ -10,6 +10,7 @@ defmodule Pleroma.Web.ActivityPub.RelayTest do alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.Relay + import ExUnit.CaptureLog import Pleroma.Factory import Mock @@ -20,7 +21,9 @@ defmodule Pleroma.Web.ActivityPub.RelayTest do describe "follow/1" do test "returns errors when user not found" do - assert Relay.follow("test-ap-id") == {:error, "Could not fetch by AP id"} + assert capture_log(fn -> + assert Relay.follow("test-ap-id") == {:error, "Could not fetch by AP id"} + end) =~ "Could not fetch by AP id" end test "returns activity" do @@ -37,7 +40,9 @@ defmodule Pleroma.Web.ActivityPub.RelayTest do describe "unfollow/1" do test "returns errors when user not found" do - assert Relay.unfollow("test-ap-id") == {:error, "Could not fetch by AP id"} + assert capture_log(fn -> + assert Relay.unfollow("test-ap-id") == {:error, "Could not fetch by AP id"} + end) =~ "Could not fetch by AP id" end test "returns activity" do @@ -78,7 +83,9 @@ defmodule Pleroma.Web.ActivityPub.RelayTest do } ) - assert Relay.publish(activity) == {:error, nil} + assert capture_log(fn -> + assert Relay.publish(activity) == {:error, nil} + end) =~ "[error] error: nil" end test_with_mock "returns announce activity and publish to federate", |