This repository has been archived by the owner on May 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #333 from sul-dlss/configure-collection
Configure an indexer for a collection
- Loading branch information
Showing
2 changed files
with
36 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
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,25 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe Indexer do | ||
subject(:indexer) { described_class.for(model) } | ||
|
||
context 'when the model is an item' do | ||
let(:model) { Dor::Item.new } | ||
|
||
it { is_expected.to be_instance_of CompositeIndexer::Instance } | ||
end | ||
|
||
context 'when the model is a collection' do | ||
let(:model) { Dor::Collection.new } | ||
|
||
it { is_expected.to be_instance_of CompositeIndexer::Instance } | ||
end | ||
|
||
context 'when the model is an agreement' do | ||
let(:model) { Dor::Agreement.new } | ||
|
||
it { is_expected.to be_instance_of CompositeIndexer::Instance } | ||
end | ||
end |