Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into issue/2115
[akkoma] / test / user_test.exs
index a910226b2210ec9f32fa5dc4a0a35a61518ff2f8..cceb14eb9525cf94707b2f15999a5e4a068e6695 100644 (file)
@@ -971,23 +971,6 @@ defmodule Pleroma.UserTest do
     end
   end
 
-  describe "follow_import" do
-    test "it imports user followings from list" do
-      [user1, user2, user3] = insert_list(3, :user)
-
-      identifiers = [
-        user2.ap_id,
-        user3.nickname
-      ]
-
-      {:ok, job} = User.follow_import(user1, identifiers)
-
-      assert {:ok, result} = ObanHelpers.perform(job)
-      assert is_list(result)
-      assert result == [user2, user3]
-    end
-  end
-
   describe "mutes" do
     test "it mutes people" do
       user = insert(:user)
@@ -1194,23 +1177,6 @@ defmodule Pleroma.UserTest do
     end
   end
 
-  describe "blocks_import" do
-    test "it imports user blocks from list" do
-      [user1, user2, user3] = insert_list(3, :user)
-
-      identifiers = [
-        user2.ap_id,
-        user3.nickname
-      ]
-
-      {:ok, job} = User.blocks_import(user1, identifiers)
-
-      assert {:ok, result} = ObanHelpers.perform(job)
-      assert is_list(result)
-      assert result == [user2, user3]
-    end
-  end
-
   describe "get_recipients_from_activity" do
     test "works for announces" do
       actor = insert(:user)
@@ -1676,7 +1642,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 +1651,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)