summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/notification_view_test.exs
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-04-02 10:52:29 +0000
committerlambda <lain@soykaf.club>2019-04-02 10:52:29 +0000
commit26d509cc861ad865b12d187fc163fa78c4c128a7 (patch)
treeafdc885e17def5b2f65c3dbc8c33aa595f06026b /test/web/mastodon_api/notification_view_test.exs
parentb5d486d9ac40c051c23d23ef5a48685d08127904 (diff)
parent11c2d6bdc458d40616e677ff71e471bd827344ee (diff)
downloadpleroma-26d509cc861ad865b12d187fc163fa78c4c128a7.tar.gz
pleroma-26d509cc861ad865b12d187fc163fa78c4c128a7.zip
Merge branch 'get_by_id' into 'develop'
Replace `Repo.get(Module, id)` with `Module.get_by_id(id)` where possible See merge request pleroma/pleroma!1009
Diffstat (limited to 'test/web/mastodon_api/notification_view_test.exs')
-rw-r--r--test/web/mastodon_api/notification_view_test.exs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/web/mastodon_api/notification_view_test.exs b/test/web/mastodon_api/notification_view_test.exs
index b826a7e61..f2c1eb76c 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_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),