Skip to content
Snippets Groups Projects
Unverified Commit b179ff84 authored by Matt Jankowski's avatar Matt Jankowski Committed by GitHub
Browse files

Add specs for Chewy importers (#24204)

parent 148c3d58
No related branches found
No related tags found
No related merge requests found
# 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
# 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
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment