X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fmastodon_api%2Fnotification_view_test.exs;h=977ea1e87edf1bc572797a51eae522680172ca6c;hb=b9cdf6d3b9940fded7d6be9f8771fd9c211afdd4;hp=b826a7e612423fbe304abb96d6d4e1516ef6a2a0;hpb=4b3c86c1a61a029202a262229c713cc3737b2a1b;p=akkoma diff --git a/test/web/mastodon_api/notification_view_test.exs b/test/web/mastodon_api/notification_view_test.exs index b826a7e61..977ea1e87 100644 --- a/test/web/mastodon_api/notification_view_test.exs +++ b/test/web/mastodon_api/notification_view_test.exs @@ -21,7 +21,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do mentioned_user = insert(:user) {:ok, activity} = CommonAPI.post(user, %{"status" => "hey @#{mentioned_user.nickname}"}) {:ok, [notification]} = Notification.create_notifications(activity) - user = Repo.get(User, user.id) + user = User.get_cached_by_id(user.id) expected = %{ id: to_string(notification.id), @@ -44,7 +44,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do {:ok, create_activity} = CommonAPI.post(user, %{"status" => "hey"}) {:ok, favorite_activity, _object} = CommonAPI.favorite(create_activity.id, another_user) {:ok, [notification]} = Notification.create_notifications(favorite_activity) - create_activity = Repo.get(Activity, create_activity.id) + create_activity = Activity.get_by_id(create_activity.id) expected = %{ id: to_string(notification.id), @@ -66,7 +66,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do {:ok, create_activity} = CommonAPI.post(user, %{"status" => "hey"}) {:ok, reblog_activity, _object} = CommonAPI.repeat(create_activity.id, another_user) {:ok, [notification]} = Notification.create_notifications(reblog_activity) - reblog_activity = Repo.get(Activity, create_activity.id) + reblog_activity = Activity.get_by_id(create_activity.id) expected = %{ id: to_string(notification.id),