diff options
author | rinpatch <rinpatch@sdf.org> | 2020-05-22 14:36:08 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-05-22 14:36:08 +0000 |
commit | 1fa7aa9fc544e9c9b55ecc1a92d93c95eabcfa62 (patch) | |
tree | 6d2d65450e3f1d4689c37c168743357741a7f434 /test | |
parent | 96650c55aec6f6013ca4fbb35b37260f1138c80b (diff) | |
parent | bcb549531ff5f90253adc1b8cc2900c348f20175 (diff) | |
download | pleroma-1fa7aa9fc544e9c9b55ecc1a92d93c95eabcfa62.tar.gz pleroma-1fa7aa9fc544e9c9b55ecc1a92d93c95eabcfa62.zip |
Merge branch 'emoji-react-better-errors' into 'develop'
EmojiReactionController: Return more appropriate error.
See merge request pleroma/pleroma!2569
Diffstat (limited to 'test')
-rw-r--r-- | test/web/pleroma_api/controllers/emoji_reaction_controller_test.exs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/web/pleroma_api/controllers/emoji_reaction_controller_test.exs b/test/web/pleroma_api/controllers/emoji_reaction_controller_test.exs index ee66ebf87..e1bb5ebfe 100644 --- a/test/web/pleroma_api/controllers/emoji_reaction_controller_test.exs +++ b/test/web/pleroma_api/controllers/emoji_reaction_controller_test.exs @@ -33,6 +33,13 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionControllerTest do assert result["pleroma"]["emoji_reactions"] == [ %{"name" => "☕", "count" => 1, "me" => true} ] + + # Reacting with a non-emoji + assert conn + |> assign(:user, other_user) + |> assign(:token, insert(:oauth_token, user: other_user, scopes: ["write:statuses"])) + |> put("/api/v1/pleroma/statuses/#{activity.id}/reactions/x") + |> json_response_and_validate_schema(400) end test "DELETE /api/v1/pleroma/statuses/:id/reactions/:emoji", %{conn: conn} do |