Skip to content

Commit 2738512

Browse files
committed
TIMDEX format to sym
1 parent 1137661 commit 2738512

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/models/normalize_timdex_record.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def normalize
1212
creators:,
1313
source:,
1414
year:,
15-
'format' => format,
15+
format:,
1616
'links' => links,
1717
'citation' => citation,
1818
'identifier' => identifier,

test/models/normalize_timdex_record_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ def minimal_record
6969

7070
test 'normalizes format from content type' do
7171
normalized = NormalizeTimdexRecord.new(full_record, 'test').normalize
72-
assert_equal 'Dataset ; Geospatial data', normalized['format']
72+
assert_equal 'Dataset ; Geospatial data', normalized[:format]
7373
end
7474

7575
test 'handles missing format' do
7676
record_without_format = minimal_record.dup
7777
record_without_format.delete('contentType')
7878
normalized = NormalizeTimdexRecord.new(record_without_format, 'test').normalize
79-
assert_empty normalized['format']
79+
assert_empty normalized[:format]
8080
end
8181

8282
test 'normalizes links from source link' do

test/models/normalize_timdex_results_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def empty_timdex_response
2323
assert_equal 'Sample TIMDEX Record for Testing', first_result[:title]
2424
assert_equal 'test-record-123', first_result['identifier']
2525
assert_equal 'Test Repository', first_result[:source]
26-
assert_equal 'Dataset ; Geospatial data', first_result['format']
26+
assert_equal 'Dataset ; Geospatial data', first_result[:format]
2727
assert_equal '2023', first_result[:year]
2828

2929
# Check TIMDEX-specific fields are preserved

0 commit comments

Comments
 (0)