Fix order of args for vote/3
This commit is contained in:
parent
8127e0d8cc
commit
1cccc0fc21
7 changed files with 14 additions and 14 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue