diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-09-17 17:14:20 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-09-17 17:14:20 +0300 |
commit | d9fb5bc08ad67b55d0cd25c1a0d7d3a740758427 (patch) | |
tree | 6303695147d01ab5e71e556f2b8f7725536e475f /test/user_test.exs | |
parent | 7cdbd91d83c02a79c22783ca489ef82e82b31a51 (diff) | |
parent | cd93aa2aed6fda516d4fc2aabb44c5e178a6543d (diff) | |
download | pleroma-d9fb5bc08ad67b55d0cd25c1a0d7d3a740758427.tar.gz pleroma-d9fb5bc08ad67b55d0cd25c1a0d7d3a740758427.zip |
Merge remote-tracking branch 'remotes/origin/develop' into media-preview-proxy-nostream
Diffstat (limited to 'test/user_test.exs')
-rw-r--r-- | test/user_test.exs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/user_test.exs b/test/user_test.exs index a910226b2..060918d71 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -1676,7 +1676,7 @@ defmodule Pleroma.UserTest do assert User.visible_for(user, user) == :visible end - test "returns false when the account is unauthenticated and auth is required" do + test "returns false when the account is unconfirmed and confirmation is required" do Pleroma.Config.put([:instance, :account_activation_required], true) user = insert(:user, local: true, confirmation_pending: true) @@ -1685,14 +1685,23 @@ defmodule Pleroma.UserTest do refute User.visible_for(user, other_user) == :visible end - test "returns true when the account is unauthenticated and auth is not required" do + test "returns true when the account is unconfirmed and confirmation is required but the account is remote" do + Pleroma.Config.put([:instance, :account_activation_required], true) + + user = insert(:user, local: false, confirmation_pending: true) + other_user = insert(:user, local: true) + + assert User.visible_for(user, other_user) == :visible + end + + test "returns true when the account is unconfirmed and confirmation is not required" do user = insert(:user, local: true, confirmation_pending: true) other_user = insert(:user, local: true) assert User.visible_for(user, other_user) == :visible end - test "returns true when the account is unauthenticated and being viewed by a privileged account (auth required)" do + test "returns true when the account is unconfirmed and being viewed by a privileged account (confirmation required)" do Pleroma.Config.put([:instance, :account_activation_required], true) user = insert(:user, local: true, confirmation_pending: true) |