accounts_index_importer_spec.rb 411 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe Importer::AccountsIndexImporter do
  4. describe 'import!' do
  5. let(:pool) { Concurrent::FixedThreadPool.new(5) }
  6. let(:importer) { described_class.new(batch_size: 123, executor: pool) }
  7. before { Fabricate(:account) }
  8. it 'indexes relevant accounts' do
  9. expect { importer.import! }.to update_index(AccountsIndex)
  10. end
  11. end
  12. end