Skip to content

Commit

Permalink
Revert "Removes setting a publisher default value. (#629)" (#644)
Browse files Browse the repository at this point in the history
This reverts commit 0308efb.
  • Loading branch information
bwatson78 authored Nov 15, 2024
1 parent 6f7f33f commit 8ef521a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/models/concerns/bulkrax/has_local_processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ def add_local
# data_classification
parsed_metadata['data_classification'] = parsed_metadata['data_classification'].blank? ? 'Public' : parsed_metadata['data_classification'].strip

# publisher
parsed_metadata['publisher'] = parsed_metadata['publisher'].blank? ? 'Emory University Libraries' : parsed_metadata['publisher'].strip

process_emory_content_type
end

Expand Down
3 changes: 2 additions & 1 deletion spec/models/bulkrax/csv_entry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
)
end
let(:data) do
{ model: "Publication", title: "A Good Title", parent: "2", source_identifier: "1", data_classification: nil, emory_content_type: nil }
{ model: "Publication", title: "A Good Title", parent: "2", source_identifier: "1", publisher: nil, data_classification: nil, emory_content_type: nil }
end
subject(:entry) { described_class.new(importerexporter: importer, raw_metadata: data, identifier: data.fetch(:source_identifier)) }

before { entry.build_metadata }

it "passes in default values when fields are empty" do
expect(entry.parsed_metadata['publisher']).to eq('Emory University Libraries')
expect(entry.parsed_metadata['data_classification']).to eq('Public')
expect(entry.parsed_metadata['emory_content_type']).to eq('http://id.loc.gov/vocabulary/resourceTypes/txt')
end
Expand Down

0 comments on commit 8ef521a

Please sign in to comment.