Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/kernel-4.7/example_poster_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
it 'has relatedIdentifier with relationType Other and relationTypeInformation' do
related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first
expect(related_identifier['relationType']).to eq('Other')
expect(related_identifier['relationTypeInformation']).to eq('is output of')
expect(related_identifier['relationTypeInformation']).to eq('was presented at')
end
end
2 changes: 1 addition & 1 deletion spec/kernel-4.7/example_presentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
it 'has relatedIdentifier with relationType Other and relationTypeInformation' do
related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first
expect(related_identifier['relationType']).to eq('Other')
expect(related_identifier['relationTypeInformation']).to eq('is output of')
expect(related_identifier['relationTypeInformation']).to eq('was presented at')
end
end
44 changes: 43 additions & 1 deletion spec/kernel-4.7/other_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,28 @@
end
end

describe "relatedIdentifier relatedIdentifierType" do
it 'RAiD' do
related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first
related_identifier["relatedIdentifierType"] = "RAiD"
element = doc.at("relatedIdentifiers/relatedIdentifier")
element.replace related_identifier.to_s
errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s }
expect(errors.length).to eq(0)
end

it 'SWHID' do
related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first
related_identifier["relatedIdentifierType"] = "SWHID"
element = doc.at("relatedIdentifiers/relatedIdentifier")
element.replace related_identifier.to_s
errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s }
expect(errors.length).to eq(0)
end
end

describe 'relatedItem' do
it 'relatedItem with relationTypeInformation and relationType Other' do
it 'with relationTypeInformation and relationType Other' do
related_item = doc.search("relatedItems/relatedItem").first
related_item['relationType'] = 'Other'
related_item['relationTypeInformation'] = 'is output of'
Expand All @@ -261,6 +281,28 @@
end
end

describe 'relatedItem relatedItemIdentifierType' do
it 'RAiD' do
related_item = doc.search("relatedItems/relatedItem").first
related_item_identifier = related_item.at("relatedItemIdentifier")
related_item_identifier['relatedItemIdentifierType'] = 'RAiD'
element = doc.at("relatedItems/relatedItem")
element.replace related_item.to_s
errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s }
expect(errors.length).to eq(0)
end

it 'SWHID' do
related_item = doc.search("relatedItems/relatedItem").first
related_item_identifier = related_item.at("relatedItemIdentifier")
related_item_identifier['relatedItemIdentifierType'] = 'SWHID'
element = doc.at("relatedItems/relatedItem")
element.replace related_item.to_s
errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s }
expect(errors.length).to eq(0)
end
end

describe "description" do
it 'empty descriptions tag' do
element = doc.at("descriptions")
Expand Down
2 changes: 1 addition & 1 deletion spec/kernel-4/example_poster_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
it 'has relatedIdentifier with relationType Other and relationTypeInformation' do
related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first
expect(related_identifier['relationType']).to eq('Other')
expect(related_identifier['relationTypeInformation']).to eq('is output of')
expect(related_identifier['relationTypeInformation']).to eq('was presented at')
end
end
2 changes: 1 addition & 1 deletion spec/kernel-4/example_presentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
it 'has relatedIdentifier with relationType Other and relationTypeInformation' do
related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first
expect(related_identifier['relationType']).to eq('Other')
expect(related_identifier['relationTypeInformation']).to eq('is output of')
expect(related_identifier['relationTypeInformation']).to eq('was presented at')
end
end
44 changes: 43 additions & 1 deletion spec/kernel-4/other_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,28 @@
end
end

describe "relatedIdentifier relatedIdentifierType" do
it 'RAiD' do
related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first
related_identifier["relatedIdentifierType"] = "RAiD"
element = doc.at("relatedIdentifiers/relatedIdentifier")
element.replace related_identifier.to_s
errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s }
expect(errors.length).to eq(0)
end

it 'SWHID' do
related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first
related_identifier["relatedIdentifierType"] = "SWHID"
element = doc.at("relatedIdentifiers/relatedIdentifier")
element.replace related_identifier.to_s
errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s }
expect(errors.length).to eq(0)
end
end

describe 'relatedItem' do
it 'relatedItem with relationTypeInformation and relationType Other' do
it 'with relationTypeInformation and relationType Other' do
related_item = doc.search("relatedItems/relatedItem").first
related_item['relationType'] = 'Other'
related_item['relationTypeInformation'] = 'is output of'
Expand All @@ -261,6 +281,28 @@
end
end

describe 'relatedItem relatedItemIdentifierType' do
it 'RAiD' do
related_item = doc.search("relatedItems/relatedItem").first
related_item_identifier = related_item.at("relatedItemIdentifier")
related_item_identifier['relatedItemIdentifierType'] = 'RAiD'
element = doc.at("relatedItems/relatedItem")
element.replace related_item.to_s
errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s }
expect(errors.length).to eq(0)
end

it 'SWHID' do
related_item = doc.search("relatedItems/relatedItem").first
related_item_identifier = related_item.at("relatedItemIdentifier")
related_item_identifier['relatedItemIdentifierType'] = 'SWHID'
element = doc.at("relatedItems/relatedItem")
element.replace related_item.to_s
errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s }
expect(errors.length).to eq(0)
end
end

describe "description" do
it 'empty descriptions tag' do
element = doc.at("descriptions")
Expand Down