summaryrefslogtreecommitdiff
path: root/test/user_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-22 12:37:10 +0000
committerlain <lain@soykaf.club>2020-06-22 12:37:10 +0000
commit59bdef0c337f1892282e245c5a236680af8e0318 (patch)
treece4c3c2a39e88a805caa124e5b40324b923ba88b /test/user_test.exs
parent31489bc864c92c9f4b891373f34f0a9e3d8e32ff (diff)
parent0321a3e07814c3f225f19e0372b69a7813cef15e (diff)
downloadpleroma-59bdef0c337f1892282e245c5a236680af8e0318.tar.gz
pleroma-59bdef0c337f1892282e245c5a236680af8e0318.zip
Merge branch 'feature/1739-account-endpoints' into 'develop'
account visibility in masto api Closes #1739 See merge request pleroma/pleroma!2488
Diffstat (limited to 'test/user_test.exs')
-rw-r--r--test/user_test.exs10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/user_test.exs b/test/user_test.exs
index 98c79da4f..311b6c683 100644
--- a/test/user_test.exs
+++ b/test/user_test.exs
@@ -1342,11 +1342,11 @@ defmodule Pleroma.UserTest do
end
end
- describe "visible_for?/2" do
+ describe "visible_for/2" do
test "returns true when the account is itself" do
user = insert(:user, local: true)
- assert User.visible_for?(user, user)
+ assert User.visible_for(user, user) == :visible
end
test "returns false when the account is unauthenticated and auth is required" do
@@ -1355,14 +1355,14 @@ defmodule Pleroma.UserTest do
user = insert(:user, local: true, confirmation_pending: true)
other_user = insert(:user, local: true)
- refute User.visible_for?(user, other_user)
+ refute User.visible_for(user, other_user) == :visible
end
test "returns true when the account is unauthenticated and auth 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)
+ 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
@@ -1371,7 +1371,7 @@ defmodule Pleroma.UserTest do
user = insert(:user, local: true, confirmation_pending: true)
other_user = insert(:user, local: true, is_admin: true)
- assert User.visible_for?(user, other_user)
+ assert User.visible_for(user, other_user) == :visible
end
end