Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbpennel committed Jan 13, 2025
1 parent c439754 commit 7a802fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions spec/lib/active_fedora/rdf/indexing_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@
date_created: '2022-01-01')

end
let(:translator1_string) { 'index:1||translator_1||Affiliation: School of Medicine, Carolina Center for Genome Sciences' }
let(:translator2_string) { 'index:2||translator_2||Affiliation: College of Arts and Sciences, Department of Chemistry' }
let(:translator1_string) { 'index:1||translator_1||Affiliation: Carolina Center for Genome Sciences' }
let(:translator2_string) { 'index:2||translator_2||Affiliation: Department of Chemistry' }
subject(:solr_doc) do
indexer.generate_solr_document
end

it 'includes person attributes' do
expect(solr_doc['translator_display_tesim']).to include(translator1_string, translator2_string)
expect(solr_doc['creator_display_tesim']).to eq ['index:1||creator_1||Affiliation: School of Medicine, Carolina Center for Genome Sciences']
expect(solr_doc['creator_display_tesim']).to eq ['index:1||creator_1||Affiliation: Carolina Center for Genome Sciences']
expect(solr_doc['person_label_tesim']).to include('advisor_1', 'translator_2', 'translator_1', 'creator_1', 'contributor_1')
expect(solr_doc['affiliation_label_tesim']).to include('Department of Chemistry', 'Carolina Center for Genome Sciences')
expect(solr_doc['affiliation_label_sim']).to include('Department of Chemistry', 'Carolina Center for Genome Sciences')
Expand Down
5 changes: 3 additions & 2 deletions spec/services/departments_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

describe '#select_all_options' do
it 'returns only active terms' do
expect(service.select_all_options).to include(['biology', 'biology'], ['chemistry', 'chemistry'],
['history', 'history'])
expect(service.select_all_options).to include(['Biology', 'biology'], ['Chemistry', 'chemistry'],
['History', 'history'],
['Test short Carolina Center for Genome Sciences', 'Carolina Center for Genome Sciences'])
end
end

Expand Down

0 comments on commit 7a802fd

Please sign in to comment.