-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove abstract mapping tests not needed in Cocina>MODS direction #460
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ | |
end | ||
end | ||
|
||
describe 'Abstract with type "summary"' do | ||
describe 'Abstract with type' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
|
@@ -98,54 +98,6 @@ | |
end | ||
end | ||
|
||
describe 'Abstract with type "Summary"' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract type="Summary">This is a summary.</abstract> | ||
XML | ||
end | ||
|
||
let(:roundtrip_mods) do | ||
<<~XML | ||
<abstract type="summary">This is a summary.</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'This is a summary.', | ||
type: 'summary' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
describe 'Abstract with type "scope and content"' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract type="scope and content">This is a scope and content note.</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'This is a scope and content note.', | ||
type: 'scope and content' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specific type value does not matter, so this test is duplicative of the one at line 80. |
||
describe 'Abstract with display label and type' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
|
@@ -168,7 +120,7 @@ | |
end | ||
end | ||
|
||
describe 'Abstract with displayLabel "Summary" and no type' do | ||
describe 'Abstract with displayLabel and no type' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
|
@@ -189,189 +141,6 @@ | |
end | ||
end | ||
|
||
describe 'Abstract with displayLabel "Subject" and no type' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract displayLabel="Subject">Subject</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'Subject', | ||
displayLabel: 'Subject' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
describe 'Abstract with displayLabel "Review" and no type' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract displayLabel="Review">Review</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'Review', | ||
displayLabel: 'Review' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
describe 'Abstract with displayLabel "Scope and content" and no type' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract displayLabel="Scope and content">Scope and content</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'Scope and content', | ||
displayLabel: 'Scope and content' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These tests all effectively duplicate the test at line 171. |
||
describe 'Abstract with scope and content displayLabel and no type, nonstandard capitalization' do | ||
# normalize this displayLabel to be lowercase after first letter | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract displayLabel="Scope and Content">Scope and content</abstract> | ||
XML | ||
end | ||
|
||
let(:roundtrip_mods) do | ||
<<~XML | ||
<abstract displayLabel="Scope and content">Scope and content</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'Scope and content', | ||
displayLabel: 'Scope and content' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normalization not needed in Cocina>MODS direction. |
||
describe 'Abstract with displayLabel "Abstract" and no type' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract displayLabel="Abstract">Abstract</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'Abstract', | ||
displayLabel: 'Abstract' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
describe 'Abstract with displayLabel "Content advice" and no type' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract displayLabel="Content advice">Content advice</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'Content advice', | ||
displayLabel: 'Content advice' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicative of test at line 171. |
||
describe 'Abstract with content advice displayLabel and no type, nonstandard capitalization' do | ||
# normalize this displayLabel to be lowercase after first letter | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract displayLabel="Content Advice">Content advice</abstract> | ||
XML | ||
end | ||
|
||
let(:roundtrip_mods) do | ||
<<~XML | ||
<abstract displayLabel="Content advice">Content advice</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'Content advice', | ||
displayLabel: 'Content advice' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
describe 'Abstract with other displayLabel, capitalization retained' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
<<~XML | ||
<abstract displayLabel="Summary from Barnes Catalogue of Works">A summary.</abstract> | ||
XML | ||
end | ||
|
||
let(:cocina) do | ||
{ | ||
note: [ | ||
{ | ||
value: 'A summary.', | ||
type: 'abstract', | ||
displayLabel: 'Summary from Barnes Catalogue of Works' | ||
} | ||
] | ||
} | ||
end | ||
end | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normalization not needed in Cocina>MODS direction. |
||
describe 'Link to external value only' do | ||
it_behaves_like 'MODS cocina mapping' do | ||
let(:mods) do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normalization not needed in Cocina>MODS direction.