spec/writers/datacite_writer_spec.rb in bolognese-0.9.14 vs spec/writers/datacite_writer_spec.rb in bolognese-0.9.15
- old
+ new
@@ -7,12 +7,12 @@
subject = Bolognese::Metadata.new(input: input, from: "crossref")
datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
expect(datacite.dig("resourceType", "resourceTypeGeneral")).to eq("Text")
expect(datacite.dig("titles", "title")).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").length).to eq(26)
- expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral" => "Other", "title"=>"eLife", "__content__"=>"2050-084X")
- expect(datacite.dig("relatedIdentifiers", "relatedIdentifier")[1]).to eq("relatedIdentifierType"=>"DOI", "relationType"=>"References", "resourceTypeGeneral" => "Other", "__content__"=>"https://doi.org/10.1038/nature02100")
+ expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "__content__"=>"2050-084X")
+ expect(datacite.dig("relatedIdentifiers", "relatedIdentifier")[1]).to eq("relatedIdentifierType"=>"DOI", "relationType"=>"References", "__content__"=>"https://doi.org/10.1038/nature02100")
expect(datacite.dig("rightsList")).to eq("rights"=>{"rightsURI"=>"http://creativecommons.org/licenses/by/3.0"})
expect(datacite.dig("fundingReferences", "fundingReference").count).to eq(4)
expect(datacite.dig("fundingReferences", "fundingReference").last).to eq("funderName"=>"University of Lausanne", "funderIdentifier"=>{"funderIdentifierType"=>"Crossref Funder ID", "__content__"=>"https://doi.org/10.13039/501100006390"})
end
@@ -117,9 +117,9 @@
subject = Bolognese::Metadata.new(input: input, from: "schema_org")
expect(subject.valid?).to be true
datacite = Maremma.from_xml(subject.datacite).fetch("resource", {})
expect(datacite.dig("titles", "title")).to eq("Eating your own Dog Food")
expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").count).to eq(3)
- expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf", "title" => "DataCite Blog", "resourceTypeGeneral" => "Other", "__content__"=>"https://doi.org/10.5438/0000-00ss")
+ expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf", "__content__"=>"https://doi.org/10.5438/0000-00ss")
end
end
end