Maintenance: Use Model#search_index_update_backend for reflecting relevant Model#search_index_attribute_lookup when indexing record.

This commit is contained in:
Thorsten Eckel 2020-12-10 16:14:14 +01:00
parent f97a1d9211
commit b88d051dec

View file

@ -178,21 +178,21 @@ RSpec.describe SearchIndexBackend, searchindex: true do
before do
Ticket.destroy_all # needed to remove not created tickets
described_class.add('Ticket', ticket1)
ticket1.search_index_update_backend
travel 1.second
described_class.add('Ticket', ticket2)
ticket2.search_index_update_backend
travel 1.second
described_class.add('Ticket', ticket3)
ticket3.search_index_update_backend
travel 1.second
described_class.add('Ticket', ticket4)
ticket4.search_index_update_backend
travel 1.second
described_class.add('Ticket', ticket5)
ticket5.search_index_update_backend
travel 1.second
described_class.add('Ticket', ticket6)
ticket6.search_index_update_backend
travel 1.second
described_class.add('Ticket', ticket7)
ticket7.search_index_update_backend
travel 1.second
described_class.add('Ticket', ticket8)
ticket8.search_index_update_backend
described_class.refresh
end