defmodule Pleroma.Object.ContainmentTest do
use Pleroma.DataCase
- alias Pleroma.User
alias Pleroma.Object.Containment
- alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.User
import Pleroma.Factory
+ 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
data = %{
end
test "users cannot be collided through fake direction spoofing attempts" do
- user =
+ _user =
insert(:user, %{
nickname: "rye@niu.moe",
local: false,