Commit 6f5f589f authored by kaniini's avatar kaniini

test: fix mastodon api test failure

parent 3b8e5bcb
......@@ -2,21 +2,21 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
use Pleroma.DataCase
alias Pleroma.Web.MastodonAPI.{StatusView, AccountView}
alias Pleroma.User
alias Pleroma.{Repo, User, Object}
alias Pleroma.Web.OStatus
alias Pleroma.Web.CommonAPI
import Pleroma.Factory
test "a note with null content" do
note = insert(:note_activity)
note_object = Object.normalize(note.data["object"])
data =
note.data
|> put_in(["object", "content"], nil)
note_object.data
|> Map.put("content", nil)
note =
note
|> Map.put(:data, data)
Object.change(note_object, %{data: data})
|> Repo.update()
user = User.get_cached_by_ap_id(note.data["actor"])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment