Skip to content

Commit

Permalink
Adjusting #containers in SolrDocument spec to test capitalization.
Browse files Browse the repository at this point in the history
  • Loading branch information
randalldfloyd committed Dec 7, 2023
1 parent f005ae8 commit 7d79887
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec/models/concerns/arclight/solr_document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,15 @@
end

describe '#containers' do
let(:document) { SolrDocument.new(containers_ssim: ['box 1', 'folder 4-5']) }
let(:document) { SolrDocument.new(containers_ssim: ['box 1', 'folder 4-5', 'box ABC']) }

it 'handles capitalization properly' do
expect(document.containers.first).to eq 'Box 1'
expect(document.containers.last).to eq 'Box ABC'
end

it 'uses our rules for joining' do
expect(document.containers.join(', ')).to eq 'Box 1, Folder 4-5'
expect(document.containers.join(', ')).to eq 'Box 1, Folder 4-5, Box ABC'
end
end

Expand Down

0 comments on commit 7d79887

Please sign in to comment.