ChatControllerTest: Fix tests

This commit is contained in:
Lain Soykaf 2023-12-11 10:39:03 +04:00
parent d3822269ca
commit 6a738720ec
1 changed files with 5 additions and 0 deletions

View File

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