summaryrefslogtreecommitdiff
path: root/test/object/containment_test.exs
diff options
context:
space:
mode:
authorSachin Joshi <satchin.joshi@gmail.com>2019-06-23 03:25:50 +0000
committerSachin Joshi <satchin.joshi@gmail.com>2019-06-23 03:25:50 +0000
commita0c65bbd6c708b555f457bf24ec07d2d41c3fe4a (patch)
treedeb176014e3c1dcb87fba2fe1108e276c2100148 /test/object/containment_test.exs
parent1452a96ad6cfd7d250e3f7c10805994cc92016a7 (diff)
parent72f365df07e2eba75d3339629b01e5a8913513e6 (diff)
downloadpleroma-a0c65bbd6c708b555f457bf24ec07d2d41c3fe4a.tar.gz
pleroma-a0c65bbd6c708b555f457bf24ec07d2d41c3fe4a.zip
Merge branch 'develop' into 'remove-avatar-header'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'test/object/containment_test.exs')
-rw-r--r--test/object/containment_test.exs11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/object/containment_test.exs b/test/object/containment_test.exs
index 452064093..a860355b8 100644
--- a/test/object/containment_test.exs
+++ b/test/object/containment_test.exs
@@ -5,6 +5,12 @@ defmodule Pleroma.Object.ContainmentTest do
alias Pleroma.User
import Pleroma.Factory
+ import ExUnit.CaptureLog
+
+ setup_all do
+ Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
+ :ok
+ end
describe "general origin containment" do
test "contain_origin_from_id() catches obvious spoofing attempts" do
@@ -52,7 +58,10 @@ defmodule Pleroma.Object.ContainmentTest do
follower_address: User.ap_followers(%User{nickname: "rye@niu.moe"})
})
- {:error, _} = User.get_or_fetch_by_ap_id("https://n1u.moe/users/rye")
+ assert capture_log(fn ->
+ {:error, _} = User.get_or_fetch_by_ap_id("https://n1u.moe/users/rye")
+ end) =~
+ "[error] Could not decode user at fetch https://n1u.moe/users/rye, {:error, :error}"
end
end
end