ChatControllerTest: Fix tests

This commit is contained in:
Lain Soykaf 2023-12-11 10:39:03 +04:00
parent d3822269ca
commit 6a738720ec

View File

@ -7,10 +7,12 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do
alias Pleroma.Chat alias Pleroma.Chat
alias Pleroma.Chat.MessageReference alias Pleroma.Chat.MessageReference
alias Pleroma.Object alias Pleroma.Object
alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI alias Pleroma.Web.CommonAPI
import Mox
import Pleroma.Factory import Pleroma.Factory
describe "POST /api/v1/pleroma/chats/:id/messages/:message_id/read" do describe "POST /api/v1/pleroma/chats/:id/messages/:message_id/read" do
@ -112,6 +114,9 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do
filename: "an_image.jpg" filename: "an_image.jpg"
} }
ConfigMock
|> stub_with(Pleroma.Test.StaticConfig)
{:ok, upload} = ActivityPub.upload(file, actor: user.ap_id) {:ok, upload} = ActivityPub.upload(file, actor: user.ap_id)
other_user = insert(:user) other_user = insert(:user)