AttachmentValidatorTest: Fix tests

This commit is contained in:
Lain Soykaf 2023-12-11 11:02:33 +04:00
parent 54c0510d1f
commit dd0cf0371a

View file

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