about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-12-22 17:13:55 +0100
committerGitHub <noreply@github.com>2020-12-22 17:13:55 +0100
commit9915d11c0d7a15b6775af8e78fcc4d836368f88d (patch)
treeb6b5efe86ab2686eda673e81b10e05d17af30cf9 /spec
parent67ebd61f1180e63fcc671c583e7251e1e09755d9 (diff)
Fix unnecessary queries when batch-removing statuses, 100x faster (#15387)
Diffstat (limited to 'spec')
-rw-r--r--spec/services/batched_remove_status_service_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/services/batched_remove_status_service_spec.rb b/spec/services/batched_remove_status_service_spec.rb
index f84256f18..239859f06 100644
--- a/spec/services/batched_remove_status_service_spec.rb
+++ b/spec/services/batched_remove_status_service_spec.rb
@@ -26,6 +26,11 @@ RSpec.describe BatchedRemoveStatusService, type: :service do
     subject.call([status1, status2])
   end
 
+  it 'removes statuses' do
+    expect { Status.find(status1.id) }.to raise_error ActiveRecord::RecordNotFound
+    expect { Status.find(status2.id) }.to raise_error ActiveRecord::RecordNotFound
+  end
+
   it 'removes statuses from author\'s home feed' do
     expect(HomeFeed.new(alice).get(10)).to_not include([status1.id, status2.id])
   end