AttachmentValidatorTest: Fix tests

This commit is contained in:
Lain Soykaf 2023-12-11 11:02:33 +04:00
parent 54c0510d1f
commit dd0cf0371a
1 changed files with 5 additions and 0 deletions

View File

@ -5,9 +5,11 @@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do
use Pleroma.DataCase, async: true use Pleroma.DataCase, async: true
alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidator alias Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidator
import Mox
import Pleroma.Factory import Pleroma.Factory
describe "attachments" do describe "attachments" do
@ -116,6 +118,9 @@ test "it handles our own uploads" do
filename: "an_image.jpg" filename: "an_image.jpg"
} }
ConfigMock
|> stub_with(Pleroma.Test.StaticConfig)
{:ok, attachment} = ActivityPub.upload(file, actor: user.ap_id) {:ok, attachment} = ActivityPub.upload(file, actor: user.ap_id)
{:ok, attachment} = {:ok, attachment} =