diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-05-14 20:12:47 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-05-14 20:12:47 +0700 |
commit | d474995efa83e03f8aeaf57c1437aaa483960f7a (patch) | |
tree | dce9791141112c5438f30e526a587f76bda0e1fd /test/web/common_api | |
parent | e82e73478e577782407bc8452d17925675d99d10 (diff) | |
download | pleroma-d474995efa83e03f8aeaf57c1437aaa483960f7a.tar.gz |
Add Tests
Diffstat (limited to 'test/web/common_api')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index a5b07c446..11f3c8357 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -87,6 +87,19 @@ defmodule Pleroma.Web.CommonAPITest do assert object.data["content"] == "<p><b>2hu</b></p>alert('xss')" end + + test "it allows to address a list" do + user = insert(:user) + {:ok, list} = Pleroma.List.create("foo", user) + + list_ap_id = Pleroma.List.ap_id(user, list.id) + + {:ok, activity} = + CommonAPI.post(user, %{"status" => "foobar", "visibility" => "list:#{list.id}"}) + + assert activity.data["bcc"] == [list_ap_id] + assert activity.recipients == [list_ap_id, user.ap_id] + end end describe "reactions" do |