about summary refs log tree commit diff
path: root/spec/lib/importer/accounts_index_importer_spec.rb
blob: 73f9bce39914d9cfd0b3470355833d2fbe728c40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require 'rails_helper'

describe Importer::AccountsIndexImporter do
  describe 'import!' do
    let(:pool) { Concurrent::FixedThreadPool.new(5) }
    let(:importer) { described_class.new(batch_size: 123, executor: pool) }

    before { Fabricate(:account) }

    it 'indexes relevant accounts' do
      expect { importer.import! }.to update_index(AccountsIndex)
    end
  end
end