about summary refs log tree commit diff
path: root/spec/lib/importer/accounts_index_importer_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/importer/accounts_index_importer_spec.rb')
-rw-r--r--spec/lib/importer/accounts_index_importer_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/importer/accounts_index_importer_spec.rb b/spec/lib/importer/accounts_index_importer_spec.rb
new file mode 100644
index 000000000..73f9bce39
--- /dev/null
+++ b/spec/lib/importer/accounts_index_importer_spec.rb
@@ -0,0 +1,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