diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/pleroma/notification_test.exs | 4 | ||||
| -rw-r--r-- | test/pleroma/web/activity_pub/activity_pub_controller_test.exs | 2 | ||||
| -rw-r--r-- | test/pleroma/web/activity_pub/utils_test.exs | 4 | ||||
| -rw-r--r-- | test/pleroma/web/common_api_test.exs | 4 | ||||
| -rw-r--r-- | test/pleroma/web/mastodon_api/views/poll_view_test.exs | 4 | 
5 files changed, 9 insertions, 9 deletions
| diff --git a/test/pleroma/notification_test.exs b/test/pleroma/notification_test.exs index 8b3d01270..d476ad3f7 100644 --- a/test/pleroma/notification_test.exs +++ b/test/pleroma/notification_test.exs @@ -180,8 +180,8 @@ defmodule Pleroma.NotificationTest do      question = insert(:question, user: user1)      activity = insert(:question_activity, question: question) -    {:ok, _, _} = CommonAPI.vote(user2, question, [0]) -    {:ok, _, _} = CommonAPI.vote(user3, question, [1]) +    {:ok, _, _} = CommonAPI.vote(question, user2, [0]) +    {:ok, _, _} = CommonAPI.vote(question, user3, [1])      {:ok, notifications} = Notification.create_poll_notifications(activity) diff --git a/test/pleroma/web/activity_pub/activity_pub_controller_test.exs b/test/pleroma/web/activity_pub/activity_pub_controller_test.exs index cc67b72d2..8adde8730 100644 --- a/test/pleroma/web/activity_pub/activity_pub_controller_test.exs +++ b/test/pleroma/web/activity_pub/activity_pub_controller_test.exs @@ -1402,7 +1402,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do        assert question = Object.normalize(activity, fetch: false) -      {:ok, [activity], _object} = CommonAPI.vote(voter, question, [1]) +      {:ok, [activity], _object} = CommonAPI.vote(question, voter, [1])        assert outbox_get =                 conn diff --git a/test/pleroma/web/activity_pub/utils_test.exs b/test/pleroma/web/activity_pub/utils_test.exs index 47eea9a25..833c7fbf3 100644 --- a/test/pleroma/web/activity_pub/utils_test.exs +++ b/test/pleroma/web/activity_pub/utils_test.exs @@ -201,7 +201,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do          })        object = Object.normalize(activity, fetch: false) -      {:ok, votes, object} = CommonAPI.vote(other_user, object, [0, 1]) +      {:ok, votes, object} = CommonAPI.vote(object, other_user, [0, 1])        assert Enum.sort(Utils.get_existing_votes(other_user.ap_id, object)) == Enum.sort(votes)      end @@ -219,7 +219,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do          })        object = Object.normalize(activity, fetch: false) -      {:ok, [vote], object} = CommonAPI.vote(other_user, object, [0]) +      {:ok, [vote], object} = CommonAPI.vote(object, other_user, [0])        {:ok, _activity} = CommonAPI.favorite(activity.id, user)        [fetched_vote] = Utils.get_existing_votes(other_user.ap_id, object)        assert fetched_vote.id == vote.id diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index cc4482efe..381a8f37b 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -1559,9 +1559,9 @@ defmodule Pleroma.Web.CommonAPITest do        object = Object.normalize(activity, fetch: false) -      {:ok, _, object} = CommonAPI.vote(other_user, object, [0]) +      {:ok, _, object} = CommonAPI.vote(object, other_user, [0]) -      assert {:error, "Already voted"} == CommonAPI.vote(other_user, object, [1]) +      assert {:error, "Already voted"} == CommonAPI.vote(object, other_user, [1])      end    end diff --git a/test/pleroma/web/mastodon_api/views/poll_view_test.exs b/test/pleroma/web/mastodon_api/views/poll_view_test.exs index 3aa73c224..6de001421 100644 --- a/test/pleroma/web/mastodon_api/views/poll_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/poll_view_test.exs @@ -74,7 +74,7 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do      object = Object.normalize(activity, fetch: false) -    {:ok, _votes, object} = CommonAPI.vote(voter, object, [0, 1]) +    {:ok, _votes, object} = CommonAPI.vote(object, voter, [0, 1])      assert match?(               %{ @@ -119,7 +119,7 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do      object = Object.normalize(activity, fetch: false) -    {:ok, _, object} = CommonAPI.vote(other_user, object, [1, 2]) +    {:ok, _, object} = CommonAPI.vote(object, other_user, [1, 2])      result = PollView.render("show.json", %{object: object, for: other_user}) | 
