From defe5f407600e9259f6b7c0683b8d56a0349b3d9 Mon Sep 17 00:00:00 2001
From: Matt Jankowski <matt@jankowski.online>
Date: Tue, 23 Jan 2024 04:07:22 -0500
Subject: [PATCH] Fix `Rails/WhereExists` cop in lib/tasks (#28852)

---
 .rubocop_todo.yml    | 1 -
 lib/tasks/tests.rake | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 4d2f11ff7b..c0fb7a5ce2 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -89,7 +89,6 @@ Rails/WhereExists:
     - 'app/services/activitypub/fetch_remote_status_service.rb'
     - 'app/services/vote_service.rb'
     - 'app/workers/move_worker.rb'
-    - 'lib/tasks/tests.rake'
     - 'spec/models/account_spec.rb'
     - 'spec/services/activitypub/process_collection_service_spec.rb'
     - 'spec/services/purge_domain_service_spec.rb'
diff --git a/lib/tasks/tests.rake b/lib/tasks/tests.rake
index c3a9dbfd73..45f055e218 100644
--- a/lib/tasks/tests.rake
+++ b/lib/tasks/tests.rake
@@ -24,7 +24,7 @@ namespace :tests do
         exit(1)
       end
 
-      if Account.where(domain: Rails.configuration.x.local_domain).exists?
+      if Account.exists?(domain: Rails.configuration.x.local_domain)
         puts 'Faux remote accounts not properly cleaned up'
         exit(1)
       end