Fix order of args for favorite/2
This commit is contained in:
parent
b1d3348331
commit
7e37882cf7
27 changed files with 90 additions and 90 deletions
|
|
@ -326,10 +326,10 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
|
|||
|
||||
{:ok, private_activity} = CommonAPI.post(other_user, %{status: ".", visibility: "private"})
|
||||
|
||||
{:ok, _} = CommonAPI.favorite(user, public_activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(user, direct_activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(user, unlisted_activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(user, private_activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(public_activity.id, user)
|
||||
{:ok, _} = CommonAPI.favorite(direct_activity.id, user)
|
||||
{:ok, _} = CommonAPI.favorite(unlisted_activity.id, user)
|
||||
{:ok, _} = CommonAPI.favorite(private_activity.id, user)
|
||||
|
||||
activity_ids =
|
||||
conn
|
||||
|
|
@ -414,7 +414,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
|
|||
in_reply_to_status_id: activity.id
|
||||
})
|
||||
|
||||
{:ok, _favorite} = CommonAPI.favorite(user, reply.id)
|
||||
{:ok, _favorite} = CommonAPI.favorite(reply.id, user)
|
||||
|
||||
activity_ids =
|
||||
conn
|
||||
|
|
@ -432,7 +432,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
|
|||
|
||||
{:ok, mention_activity} = CommonAPI.post(other_user, %{status: "hey @#{user.nickname}"})
|
||||
{:ok, create_activity} = CommonAPI.post(user, %{status: "hey"})
|
||||
{:ok, favorite_activity} = CommonAPI.favorite(other_user, create_activity.id)
|
||||
{:ok, favorite_activity} = CommonAPI.favorite(create_activity.id, other_user)
|
||||
{:ok, reblog_activity} = CommonAPI.repeat(create_activity.id, other_user)
|
||||
{:ok, _, _, follow_activity} = CommonAPI.follow(other_user, user)
|
||||
|
||||
|
|
@ -470,7 +470,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
|
|||
|
||||
{:ok, mention_activity} = CommonAPI.post(other_user, %{status: "hey @#{user.nickname}"})
|
||||
{:ok, create_activity} = CommonAPI.post(user, %{status: "hey"})
|
||||
{:ok, favorite_activity} = CommonAPI.favorite(other_user, create_activity.id)
|
||||
{:ok, favorite_activity} = CommonAPI.favorite(create_activity.id, other_user)
|
||||
{:ok, reblog_activity} = CommonAPI.repeat(create_activity.id, other_user)
|
||||
{:ok, _, _, follow_activity} = CommonAPI.follow(other_user, user)
|
||||
|
||||
|
|
@ -517,7 +517,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
|
|||
|
||||
{:ok, _activity} = CommonAPI.post(other_user, %{status: "hey @#{user.nickname}"})
|
||||
{:ok, create_activity} = CommonAPI.post(user, %{status: "hey"})
|
||||
{:ok, _activity} = CommonAPI.favorite(other_user, create_activity.id)
|
||||
{:ok, _activity} = CommonAPI.favorite(create_activity.id, other_user)
|
||||
{:ok, _activity} = CommonAPI.repeat(create_activity.id, other_user)
|
||||
{:ok, _, _, follow_activity} = CommonAPI.follow(other_user, user)
|
||||
|
||||
|
|
|
|||
|
|
@ -1356,7 +1356,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
user1 = insert(:user)
|
||||
user2 = insert(:user)
|
||||
user3 = insert(:user)
|
||||
{:ok, _} = CommonAPI.favorite(user2, activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(activity.id, user2)
|
||||
{:ok, _bookmark} = Pleroma.Bookmark.create(user2.id, activity.id)
|
||||
{:ok, reblog_activity1} = CommonAPI.repeat(activity.id, user1)
|
||||
{:ok, _} = CommonAPI.repeat(activity.id, user2)
|
||||
|
|
@ -1483,7 +1483,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
test "unfavorites a status and returns it", %{user: user, conn: conn} do
|
||||
activity = insert(:note_activity)
|
||||
|
||||
{:ok, _} = CommonAPI.favorite(user, activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(activity.id, user)
|
||||
|
||||
conn =
|
||||
conn
|
||||
|
|
@ -1859,7 +1859,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
|
||||
test "returns users who have favorited the status", %{conn: conn, activity: activity} do
|
||||
other_user = insert(:user)
|
||||
{:ok, _} = CommonAPI.favorite(other_user, activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(activity.id, other_user)
|
||||
|
||||
response =
|
||||
conn
|
||||
|
|
@ -1890,7 +1890,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
other_user = insert(:user)
|
||||
{:ok, _user_relationship} = User.block(user, other_user)
|
||||
|
||||
{:ok, _} = CommonAPI.favorite(other_user, activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(activity.id, other_user)
|
||||
|
||||
response =
|
||||
conn
|
||||
|
|
@ -1902,7 +1902,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
|
||||
test "does not fail on an unauthenticated request", %{activity: activity} do
|
||||
other_user = insert(:user)
|
||||
{:ok, _} = CommonAPI.favorite(other_user, activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(activity.id, other_user)
|
||||
|
||||
response =
|
||||
build_conn()
|
||||
|
|
@ -1922,7 +1922,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
visibility: "direct"
|
||||
})
|
||||
|
||||
{:ok, _} = CommonAPI.favorite(other_user, activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(activity.id, other_user)
|
||||
|
||||
favourited_by_url = "/api/v1/statuses/#{activity.id}/favourited_by"
|
||||
|
||||
|
|
@ -1953,7 +1953,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
clear_config([:instance, :show_reactions], false)
|
||||
|
||||
other_user = insert(:user)
|
||||
{:ok, _} = CommonAPI.favorite(other_user, activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(activity.id, other_user)
|
||||
|
||||
response =
|
||||
conn
|
||||
|
|
@ -2096,9 +2096,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
{:ok, second_post} = CommonAPI.post(other_user, %{status: "bla"})
|
||||
{:ok, third_post} = CommonAPI.post(other_user, %{status: "bla"})
|
||||
|
||||
{:ok, _first_favorite} = CommonAPI.favorite(user, third_post.id)
|
||||
{:ok, _second_favorite} = CommonAPI.favorite(user, first_post.id)
|
||||
{:ok, third_favorite} = CommonAPI.favorite(user, second_post.id)
|
||||
{:ok, _first_favorite} = CommonAPI.favorite(third_post.id, user)
|
||||
{:ok, _second_favorite} = CommonAPI.favorite(first_post.id, user)
|
||||
{:ok, third_favorite} = CommonAPI.favorite(second_post.id, user)
|
||||
|
||||
result =
|
||||
conn
|
||||
|
|
@ -2134,7 +2134,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
{:ok, _} = CommonAPI.post(other_user, %{status: "bla"})
|
||||
{:ok, activity} = CommonAPI.post(other_user, %{status: "trees are happy"})
|
||||
|
||||
{:ok, last_like} = CommonAPI.favorite(user, activity.id)
|
||||
{:ok, last_like} = CommonAPI.favorite(activity.id, user)
|
||||
|
||||
first_conn = get(conn, "/api/v1/favourites")
|
||||
|
||||
|
|
@ -2150,7 +2150,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
status: "Trees Are Never Sad Look At Them Every Once In Awhile They're Quite Beautiful."
|
||||
})
|
||||
|
||||
{:ok, _} = CommonAPI.favorite(user, second_activity.id)
|
||||
{:ok, _} = CommonAPI.favorite(second_activity.id, user)
|
||||
|
||||
second_conn = get(conn, "/api/v1/favourites?since_id=#{last_like.id}")
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
|
|||
user = insert(:user)
|
||||
another_user = insert(:user)
|
||||
{:ok, create_activity} = CommonAPI.post(user, %{status: "hey"})
|
||||
{:ok, favorite_activity} = CommonAPI.favorite(another_user, create_activity.id)
|
||||
{:ok, favorite_activity} = CommonAPI.favorite(create_activity.id, another_user)
|
||||
{:ok, [notification]} = Notification.create_notifications(favorite_activity)
|
||||
create_activity = Activity.get_by_id(create_activity.id)
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
|
|||
|
||||
{:ok, _} = Pleroma.UserRelationship.create_mute(user, another_user)
|
||||
{:ok, create_activity} = CommonAPI.post(user, %{status: "hey"})
|
||||
{:ok, favorite_activity} = CommonAPI.favorite(another_user, create_activity.id)
|
||||
{:ok, favorite_activity} = CommonAPI.favorite(create_activity.id, another_user)
|
||||
{:ok, [notification]} = Notification.create_notifications(favorite_activity)
|
||||
create_activity = Activity.get_by_id(create_activity.id)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue