diff options
author | kaniini <ariadne@dereferenced.org> | 2019-07-31 19:13:56 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-07-31 19:13:56 +0000 |
commit | 6c06529cd4549fca3ba4b1de72838240463f8306 (patch) | |
tree | f7ba3b6370ab5a0c5abe121d860321857c32da9c /test | |
parent | b431b565f0d4eb944826c2a2745201d9bb62956e (diff) | |
parent | 813c686dd77e6d441c235b2f7a57ac7911e249af (diff) | |
download | pleroma-6c06529cd4549fca3ba4b1de72838240463f8306.tar.gz pleroma-6c06529cd4549fca3ba4b1de72838240463f8306.zip |
Merge branch 'fix/disallow-ostatus-follows-locked' into 'develop'
Disallow following locked accounts over OStatus
See merge request pleroma/pleroma!1512
Diffstat (limited to 'test')
-rw-r--r-- | test/web/ostatus/ostatus_test.exs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs index d244dbcf7..f8d389020 100644 --- a/test/web/ostatus/ostatus_test.exs +++ b/test/web/ostatus/ostatus_test.exs @@ -326,6 +326,14 @@ defmodule Pleroma.Web.OStatusTest do assert User.following?(follower, followed) end + test "refuse following over OStatus if the followed's account is locked" do + incoming = File.read!("test/fixtures/follow.xml") + _user = insert(:user, info: %{locked: true}, ap_id: "https://pawoo.net/users/pekorino") + + {:ok, [{:error, "It's not possible to follow locked accounts over OStatus"}]} = + OStatus.handle_incoming(incoming) + end + test "handle incoming unfollows with existing follow" do incoming_follow = File.read!("test/fixtures/follow.xml") {:ok, [_activity]} = OStatus.handle_incoming(incoming_follow) |