aboutsummaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-01-20 16:31:43 +0000
committerrinpatch <rinpatch@sdf.org>2020-01-20 16:31:43 +0000
commit00d08c9231abfebc872b669cd8b1f7a02cbb0175 (patch)
tree2d4da7a060b52b02e4f5c083b9456f695c5da660 /test/web/common_api/common_api_test.exs
parent6a716e3fe5290df80af72e3ad5e45ee3afb581a8 (diff)
parent7518f3877f9fb7c62c05292246e4ba82927cb09a (diff)
downloadpleroma-00d08c9231abfebc872b669cd8b1f7a02cbb0175.tar.gz
Merge branch 'favoritng-responses' into 'develop'
Mastodon API: Align favoriting / repeating behavior with Mastodon See merge request pleroma/pleroma!2119
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index b5d6d4055..f8963e42e 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -284,22 +284,22 @@ defmodule Pleroma.Web.CommonAPITest do
{:ok, %Activity{}, _} = CommonAPI.favorite(activity.id, user)
end
- test "retweeting a status twice returns an error" do
+ test "retweeting a status twice returns the status" do
user = insert(:user)
other_user = insert(:user)
{:ok, activity} = CommonAPI.post(other_user, %{"status" => "cofe"})
- {:ok, %Activity{}, _object} = CommonAPI.repeat(activity.id, user)
- {:error, _} = CommonAPI.repeat(activity.id, user)
+ {:ok, %Activity{} = activity, object} = CommonAPI.repeat(activity.id, user)
+ {:ok, ^activity, ^object} = CommonAPI.repeat(activity.id, user)
end
- test "favoriting a status twice returns an error" do
+ test "favoriting a status twice returns the status" do
user = insert(:user)
other_user = insert(:user)
{:ok, activity} = CommonAPI.post(other_user, %{"status" => "cofe"})
- {:ok, %Activity{}, _object} = CommonAPI.favorite(activity.id, user)
- {:error, _} = CommonAPI.favorite(activity.id, user)
+ {:ok, %Activity{} = activity, object} = CommonAPI.favorite(activity.id, user)
+ {:ok, ^activity, ^object} = CommonAPI.favorite(activity.id, user)
end
end