diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-11-25 21:08:55 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-12-04 04:52:09 +0000 |
commit | 6f5f589f73da05ee09eef61b6a76a2ef611efa7c (patch) | |
tree | 1819c8ad55aa145980464aee519c6420a1fba96a /test | |
parent | 3b8e5bcbeb03f3cfa5de1c4e7a4f3a04871094d1 (diff) | |
download | pleroma-6f5f589f73da05ee09eef61b6a76a2ef611efa7c.tar.gz |
test: fix mastodon api test failure
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index 31554a07d..4f58ce8af 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -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"]) |