diff options
author | lain <lain@soykaf.club> | 2020-01-20 18:10:55 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-01-20 18:10:55 +0100 |
commit | 7d8b709d293064462256d9a6392f993232323a4d (patch) | |
tree | 9565cc8b0eae80ed40cae526a124a3cfa9e2edec /test/web/common_api/common_api_test.exs | |
parent | 4c5b5f14dcec51cba8e86bcfcf2943ee9b49b0e4 (diff) | |
parent | ab36459464311389c2929ff1c48537889066a9f8 (diff) | |
download | pleroma-7d8b709d293064462256d9a6392f993232323a4d.tar.gz pleroma-7d8b709d293064462256d9a6392f993232323a4d.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into emoji-reaction-extensions
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 |