statuses_index_importer_spec.rb 416 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe Importer::StatusesIndexImporter 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(:status) }
  8. it 'indexes relevant statuses' do
  9. expect { importer.import! }.to update_index(StatusesIndex)
  10. end
  11. end
  12. end