diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-01-21 19:45:13 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-01-21 19:45:13 +0300 |
commit | 22e94bb2c7a4de93a741b7ca45148cee4a0d601a (patch) | |
tree | c1e388a0d21ff768d8b53bc53662d96cbc3d2ae1 /test/web/common_api/common_api_test.exs | |
parent | cde828ff7df64740f36b2fc9dfdbfc8d76a8a78d (diff) | |
parent | 04c9ca5d68eb4d9c8abc82a91d5df3c483089b9b (diff) | |
download | pleroma-22e94bb2c7a4de93a741b7ca45148cee4a0d601a.tar.gz pleroma-22e94bb2c7a4de93a741b7ca45148cee4a0d601a.zip |
Merge branch 'develop' into fix/attachments-cleanup
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 12 |
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 |