diff options
author | Ivan Tashkinov <ivant.business@gmail.com> | 2019-03-18 10:26:41 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivant.business@gmail.com> | 2019-03-18 10:26:41 +0300 |
commit | 2a96283efbd46c017cf9e15ef4fda3188e5e5bca (patch) | |
tree | 3265b9ff9f830a366d14870486c85ddcd08f51c9 /test/web/common_api/common_api_test.exs | |
parent | 273905744242b013ba9736ff7e1415a0499022d1 (diff) | |
parent | 1344e34ed3a337b54e450af474f81e2f326bf768 (diff) | |
download | pleroma-2a96283efbd46c017cf9e15ef4fda3188e5e5bca.tar.gz pleroma-2a96283efbd46c017cf9e15ef4fda3188e5e5bca.zip |
[#923] Merge remote-tracking branch 'remotes/upstream/develop' into twitter_oauth
# Conflicts:
# config/config.exs
# lib/pleroma/web/auth/pleroma_authenticator.ex
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index 181813c76..f83f80b40 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -221,4 +221,27 @@ defmodule Pleroma.Web.CommonAPITest do } = flag_activity end end + + describe "reblog muting" do + setup do + muter = insert(:user) + + muted = insert(:user) + + [muter: muter, muted: muted] + end + + test "add a reblog mute", %{muter: muter, muted: muted} do + {:ok, muter} = CommonAPI.hide_reblogs(muter, muted) + + assert Pleroma.User.showing_reblogs?(muter, muted) == false + end + + test "remove a reblog mute", %{muter: muter, muted: muted} do + {:ok, muter} = CommonAPI.hide_reblogs(muter, muted) + {:ok, muter} = CommonAPI.show_reblogs(muter, muted) + + assert Pleroma.User.showing_reblogs?(muter, muted) == true + end + end end |