otwarchive-symphonyarchive/spec/models/search/work_creator_indexer_spec.rb

16 lines
430 B
Ruby
Raw Permalink Normal View History

2026-03-11 22:22:11 +00:00
require "spec_helper"
describe WorkCreatorIndexer, work_search: true do
describe "#index_documents" do
context "with multiple works in a batch", :n_plus_one do
populate { |n| create_list(:work, n) }
it "generates a constant number of database queries" do
expect do
WorkCreatorIndexer.new(Work.ids).index_documents
end.to perform_constant_number_of_queries
end
end
end
end