diff options
| author | lain <lain@soykaf.club> | 2020-01-20 14:42:43 +0000 | 
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-01-20 14:42:43 +0000 | 
| commit | 6a716e3fe5290df80af72e3ad5e45ee3afb581a8 (patch) | |
| tree | 837f45778625fa67d41c9dc60ccd346cad67cd12 /test | |
| parent | 42ea480e95862c09c07f6b4711648c192a66fdf5 (diff) | |
| parent | 5c533e10e73d92b753d9ac20b2d7ab14f42649b2 (diff) | |
| download | pleroma-6a716e3fe5290df80af72e3ad5e45ee3afb581a8.tar.gz pleroma-6a716e3fe5290df80af72e3ad5e45ee3afb581a8.zip | |
Merge branch 'credo/version-bump-1.1.5' into 'develop'
Bump credo to 1.1.5
See merge request pleroma/pleroma!2115
Diffstat (limited to 'test')
| -rw-r--r-- | test/notification_test.exs | 4 | ||||
| -rw-r--r-- | test/web/activity_pub/transmogrifier/follow_handling_test.exs | 2 | ||||
| -rw-r--r-- | test/web/admin_api/admin_api_controller_test.exs | 2 | ||||
| -rw-r--r-- | test/web/common_api/common_api_utils_test.exs | 8 | ||||
| -rw-r--r-- | test/web/twitter_api/password_controller_test.exs | 2 | 
5 files changed, 9 insertions, 9 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/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 | 
