diff options
| author | rinpatch <rinpatch@sdf.org> | 2019-04-17 15:46:59 +0300 |
|---|---|---|
| committer | rinpatch <rinpatch@sdf.org> | 2019-04-17 15:46:59 +0300 |
| commit | ff8d76c670eb25213948974d03bbc389421558a6 (patch) | |
| tree | ab95b3af50e07d7e6b04861cc2aa6380c9e72ec1 /test/web/mastodon_api | |
| parent | c3a20528060e4fb95292dd93768d9afc8926e66e (diff) | |
| download | pleroma-ff8d76c670eb25213948974d03bbc389421558a6.tar.gz pleroma-ff8d76c670eb25213948974d03bbc389421558a6.zip | |
Refactor all tests that acessed the embeded object
Diffstat (limited to 'test/web/mastodon_api')
| -rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 4 | ||||
| -rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 70ab92386..245887ff8 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -2791,9 +2791,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert %{"content" => "xD", "id" => id} = json_response(conn1, 200) - activity = Activity.get_by_id(id) + activity = Activity.get_by_id_with_object(id) - assert activity.data["object"]["inReplyTo"] == replied_to.data["object"]["id"] + assert Object.normalize(activity).data["inReplyTo"] == Object.normalize(replied_to).data["id"] assert Activity.get_in_reply_to_activity(activity).id == replied_to.id # Reblog from the third user diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index ad6344006..a02c7c210 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -61,7 +61,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do |> Map.put("content", nil) Object.change(note_object, %{data: data}) - |> Repo.update() + |> Object.update_and_set_cache() User.get_cached_by_ap_id(note.data["actor"]) |
