projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add activity get mix task
[akkoma]
/
test
/
object
/
containment_test.exs
diff --git
a/test/object/containment_test.exs
b/test/object/containment_test.exs
index cb74c9f4fa3d5b83dab99f7eac1e6c120157d12e..a860355b8e21eff9a64d8f8a8f1692f56f8daf33 100644
(file)
--- a/
test/object/containment_test.exs
+++ b/
test/object/containment_test.exs
@@
-1,10
+1,16
@@
defmodule Pleroma.Object.ContainmentTest do
use Pleroma.DataCase
defmodule Pleroma.Object.ContainmentTest do
use Pleroma.DataCase
- alias Pleroma.User
alias Pleroma.Object.Containment
alias Pleroma.Object.Containment
+ alias Pleroma.User
import Pleroma.Factory
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
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"})
})
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
end
end
end