about summary refs log tree commit diff
path: root/spec/lib/importer/tags_index_importer_spec.rb
diff options
context:
space:
mode:
authorMatt Jankowski <matt@jankowski.online>2023-03-22 09:06:26 -0400
committerGitHub <noreply@github.com>2023-03-22 14:06:26 +0100
commitb179ff84c76b79f91793fdb23e5e9c84ad46707a (patch)
tree735529f8c552803344a5eb89c4700814933171fc /spec/lib/importer/tags_index_importer_spec.rb
parent148c3d589461440400c2850cecc79c45a70bdca6 (diff)
Add specs for Chewy importers (#24204)
Diffstat (limited to 'spec/lib/importer/tags_index_importer_spec.rb')
-rw-r--r--spec/lib/importer/tags_index_importer_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/importer/tags_index_importer_spec.rb b/spec/lib/importer/tags_index_importer_spec.rb
new file mode 100644
index 000000000..348990c01
--- /dev/null
+++ b/spec/lib/importer/tags_index_importer_spec.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+describe Importer::TagsIndexImporter do
+  describe 'import!' do
+    let(:pool) { Concurrent::FixedThreadPool.new(5) }
+    let(:importer) { described_class.new(batch_size: 123, executor: pool) }
+
+    before { Fabricate(:tag) }
+
+    it 'indexes relevant tags' do
+      expect { importer.import! }.to update_index(TagsIndex)
+    end
+  end
+end