forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add specs for Chewy importers (mastodon#24204)
- Loading branch information
1 parent
148c3d5
commit b179ff8
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |