Test User with confirmation_pending: true, approval_pending: true
authorAlex Gleason <alex@alexgleason.me>
Tue, 14 Jul 2020 23:46:57 +0000 (18:46 -0500)
committerAlex Gleason <alex@alexgleason.me>
Tue, 14 Jul 2020 23:46:57 +0000 (18:46 -0500)
test/user_test.exs

index 9da2aa411bd51e9dad14e891fd375acebb643dd6..cd39e162323cf63f0e38ab144f417a0f5e2a8617 100644 (file)
@@ -1390,7 +1390,10 @@ defmodule Pleroma.UserTest do
     end
 
     test "returns :approval_pending for unapproved user" do
-      user = insert(:user, local: true, confirmation_pending: false, approval_pending: true)
+      user = insert(:user, local: true, approval_pending: true)
+      assert User.account_status(user) == :approval_pending
+
+      user = insert(:user, local: true, confirmation_pending: true, approval_pending: true)
       assert User.account_status(user) == :approval_pending
     end
   end