X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fuser_test.exs;h=311b6c68300a11d7880e79fdbf49577f30a67dcd;hb=4c5fb831b3b59309a475a141eb73cc440533d0ff;hp=98c79da4f642f7717e8ae12a08d5f27c98cb3b32;hpb=4ec2fb967e0eb0559e39a6d698107f6af4d7a891;p=akkoma 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