about summary refs log tree commit diff
path: root/spec/lib/importer/statuses_index_importer_spec.rb
blob: d5e1c9f2cb9a0ff718e2c95fd97b81663dccc296 (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::StatusesIndexImporter do
  describe 'import!' do
    let(:pool) { Concurrent::FixedThreadPool.new(5) }
    let(:importer) { described_class.new(batch_size: 123, executor: pool) }

    before { Fabricate(:status) }

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