diff options
author | lain <lain@soykaf.club> | 2020-01-28 17:52:42 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-01-28 17:52:42 +0100 |
commit | cedee2793d96b0384a3041ea0a6cd1f2b1c3dd1e (patch) | |
tree | dfc1a2b2bb27d845bbde24b023287122f5d39ed7 /test/web/activity_pub/utils_test.exs | |
parent | ae78059ff433739b83aaa3ccff9245ace153146d (diff) | |
parent | e8f22451da18aeba9bcf9f9f6acf93690ccb3cba (diff) | |
download | pleroma-cedee2793d96b0384a3041ea0a6cd1f2b1c3dd1e.tar.gz pleroma-cedee2793d96b0384a3041ea0a6cd1f2b1c3dd1e.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into features/remote-follow-userpage-redirect
Diffstat (limited to 'test/web/activity_pub/utils_test.exs')
-rw-r--r-- | test/web/activity_pub/utils_test.exs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/web/activity_pub/utils_test.exs b/test/web/activity_pub/utils_test.exs index 586eb1d2f..211fa6c95 100644 --- a/test/web/activity_pub/utils_test.exs +++ b/test/web/activity_pub/utils_test.exs @@ -636,4 +636,17 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do assert updated_object.data["announcement_count"] == 1 end end + + describe "get_cached_emoji_reactions/1" do + test "returns the data or an emtpy list" do + object = insert(:note) + assert Utils.get_cached_emoji_reactions(object) == [] + + object = insert(:note, data: %{"reactions" => [["x", ["lain"]]]}) + assert Utils.get_cached_emoji_reactions(object) == [["x", ["lain"]]] + + object = insert(:note, data: %{"reactions" => %{}}) + assert Utils.get_cached_emoji_reactions(object) == [] + end + end end |