mix format
authorFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 22 Jun 2022 16:20:55 +0000 (17:20 +0100)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 22 Jun 2022 16:20:55 +0000 (17:20 +0100)
test/pleroma/web/activity_pub/visibility_test.exs
test/pleroma/web/mastodon_api/views/notification_view_test.exs

index 7b389ed76f0fff99242c09d4430392714a801a3f..1595f9085f2f8115bfddad5fc19f0d6650fc77f3 100644 (file)
@@ -34,8 +34,7 @@ defmodule Pleroma.Web.ActivityPub.VisibilityTest do
     {:ok, unlisted} =
       CommonAPI.post(user, %{status: "@#{mentioned.nickname}", visibility: "unlisted"})
 
-    {:ok, local} =
-      CommonAPI.post(user, %{status: "@#{mentioned.nickname}", visibility: "local"})
+    {:ok, local} = CommonAPI.post(user, %{status: "@#{mentioned.nickname}", visibility: "local"})
 
     {:ok, list} =
       CommonAPI.post(user, %{
index b5e36c86b3a6fa12b11e2c368dcb41383a040768..a22c9df1d1a5b377b504bb7b37cc7f5fc9515c7a 100644 (file)
@@ -238,7 +238,9 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
       other_user = insert(:user, local: false)
 
       {:ok, activity} = CommonAPI.post(user, %{status: "#morb"})
-      {:ok, emoji_react, _} = Builder.emoji_react(other_user, Object.normalize(activity, fetch: false), ":100a:")
+
+      {:ok, emoji_react, _} =
+        Builder.emoji_react(other_user, Object.normalize(activity, fetch: false), ":100a:")
 
       remoteUrl = "http://evil.website/emoji/100a.png"
       [tag] = emoji_react["tag"]
@@ -259,11 +261,12 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
         pleroma: %{is_seen: false, is_muted: false},
         type: "pleroma:emoji_reaction",
         emoji: ":100a:",
-        emoji_url: (if testProxy, do: MediaProxy.encode_url(remoteUrl), else: remoteUrl),
+        emoji_url: if(testProxy, do: MediaProxy.encode_url(remoteUrl), else: remoteUrl),
         account: AccountView.render("show.json", %{user: other_user, for: user}),
         status: StatusView.render("show.json", %{activity: activity, for: user}),
         created_at: Utils.to_masto_date(notification.inserted_at)
       }
+
       test_notifications_rendering([notification], user, [expected])
     end
   end