diff options
Diffstat (limited to 'test')
6 files changed, 9 insertions, 14 deletions
| diff --git a/test/notification_test.exs b/test/notification_test.exs index f5f23bb5a..9a1c2f2b5 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -745,7 +745,7 @@ defmodule Pleroma.NotificationTest do        {:ok, _activity} = CommonAPI.post(blocked, %{"status" => "hey @#{user.nickname}"}) -      assert length(Notification.for_user(user, %{with_muted: true})) == 0 +      assert Enum.empty?(Notification.for_user(user, %{with_muted: true}))      end      test "it doesn't return notifications from a domain-blocked user when with_muted is set" do @@ -755,7 +755,7 @@ defmodule Pleroma.NotificationTest do        {:ok, _activity} = CommonAPI.post(blocked, %{"status" => "hey @#{user.nickname}"}) -      assert length(Notification.for_user(user, %{with_muted: true})) == 0 +      assert Enum.empty?(Notification.for_user(user, %{with_muted: true}))      end      test "it returns notifications from muted threads when with_muted is set" do diff --git a/test/web/activity_pub/transmogrifier/follow_handling_test.exs b/test/web/activity_pub/transmogrifier/follow_handling_test.exs index 7d6d0814d..1c88b05c2 100644 --- a/test/web/activity_pub/transmogrifier/follow_handling_test.exs +++ b/test/web/activity_pub/transmogrifier/follow_handling_test.exs @@ -78,7 +78,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do          )          |> Repo.all() -      assert length(accepts) == 0 +      assert Enum.empty?(accepts)      end      test "it works for follow requests when you are already followed, creating a new accept activity" do diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs index 12077135c..d11b26207 100644 --- a/test/web/admin_api/admin_api_controller_test.exs +++ b/test/web/admin_api/admin_api_controller_test.exs @@ -2864,7 +2864,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do        response = json_response(ret_conn, 200) -      assert length(response) == 0 +      assert Enum.empty?(response)      end    end diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs index 2588898d0..4b761e039 100644 --- a/test/web/common_api/common_api_utils_test.exs +++ b/test/web/common_api/common_api_utils_test.exs @@ -307,7 +307,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do        {to, cc} = Utils.get_to_and_cc(user, mentions, nil, "private", nil)        assert length(to) == 2 -      assert length(cc) == 0 +      assert Enum.empty?(cc)        assert mentioned_user.ap_id in to        assert user.follower_address in to @@ -323,7 +323,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do        {to, cc} = Utils.get_to_and_cc(user, mentions, activity, "private", nil)        assert length(to) == 3 -      assert length(cc) == 0 +      assert Enum.empty?(cc)        assert mentioned_user.ap_id in to        assert third_user.ap_id in to @@ -338,7 +338,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do        {to, cc} = Utils.get_to_and_cc(user, mentions, nil, "direct", nil)        assert length(to) == 1 -      assert length(cc) == 0 +      assert Enum.empty?(cc)        assert mentioned_user.ap_id in to      end @@ -353,7 +353,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do        {to, cc} = Utils.get_to_and_cc(user, mentions, activity, "direct", nil)        assert length(to) == 2 -      assert length(cc) == 0 +      assert Enum.empty?(cc)        assert mentioned_user.ap_id in to        assert third_user.ap_id in to diff --git a/test/web/pleroma_api/controllers/pleroma_api_controller_test.exs b/test/web/pleroma_api/controllers/pleroma_api_controller_test.exs index 3f7ef13bc..fb7500134 100644 --- a/test/web/pleroma_api/controllers/pleroma_api_controller_test.exs +++ b/test/web/pleroma_api/controllers/pleroma_api_controller_test.exs @@ -57,11 +57,6 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIControllerTest do      {:ok, activity} = CommonAPI.post(user, %{"status" => "#cofe"}) -    conn = -      conn -      |> assign(:user, user) -      |> assign(:token, insert(:oauth_token, user: user, scopes: ["read:statuses"])) -      result =        conn        |> get("/api/v1/pleroma/statuses/#{activity.id}/emoji_reactions_by") diff --git a/test/web/twitter_api/password_controller_test.exs b/test/web/twitter_api/password_controller_test.exs index 840c84a05..29ba7d265 100644 --- a/test/web/twitter_api/password_controller_test.exs +++ b/test/web/twitter_api/password_controller_test.exs @@ -55,7 +55,7 @@ defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do        user = refresh_record(user)        assert Comeonin.Pbkdf2.checkpw("test", user.password_hash) -      assert length(Token.get_user_tokens(user)) == 0 +      assert Enum.empty?(Token.get_user_tokens(user))      end      test "it sets password_reset_pending to false", %{conn: conn} do | 
