spec/readers/crossref_reader_spec.rb in bolognese-1.4.4 vs spec/readers/crossref_reader_spec.rb in bolognese-1.4.5
- old
+ new
@@ -363,10 +363,11 @@
expect(subject.titles).to eq([{"title"=>"The Politics of the Past in Early China"}])
expect(subject.dates).to eq([{"date"=>"2019-07-01", "dateType"=>"Issued"}, {"date"=>"2019-07-06T10:20:03Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2019")
expect(subject.publisher).to eq("Cambridge University Press")
expect(subject.agency).to eq("Crossref")
+ expect(subject.date_registered).to eq("2019-07-06T10:19:22Z")
end
it "another book" do
input = "https://doi.org/10.2973/odp.proc.ir.180.2000"
subject = Bolognese::Metadata.new(input: input)
@@ -380,10 +381,11 @@
expect(subject.titles).to eq([{"title"=>"Proceedings of the Ocean Drilling Program, 180 Initial Reports"}])
expect(subject.dates).to eq([{"date"=>"2000-02-04", "dateType"=>"Issued"}, {"date"=>"2009-02-02T21:19:43Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2000")
expect(subject.publisher).to eq("Ocean Drilling Program")
expect(subject.agency).to eq("Crossref")
+ expect(subject.date_registered).to eq("2006-10-17T20:17:44Z")
end
it "yet another book" do
input = "https://doi.org/10.1029/ar035"
subject = Bolognese::Metadata.new(input: input)
@@ -398,10 +400,11 @@
expect(subject.publisher).to eq("American Geophysical Union")
expect(subject.related_identifiers.length).to eq(44)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1016/0031-0182(70)90103-3", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("identifier"=>"0066-4634", "identifierType"=>"ISSN", "title"=>"Antarctic Research Series", "type"=>"Book Series", "volume"=>"35")
expect(subject.agency).to eq("Crossref")
+ expect(subject.date_registered).to be_nil
end
it "mEDRA" do
input = "https://doi.org/10.3280/ecag2018-001005"
subject = Bolognese::Metadata.new(input: input)
@@ -476,10 +479,11 @@
expect(subject.titles).to eq([{"title"=>"Distances, absence, proximités et présences : des concepts en déplacement"}, {"title"=>"Distance(s), proximity and presence(s): evolving concepts"}])
expect(subject.dates).to eq([{"date"=>"2014-12-23", "dateType"=>"Issued"}, {"date"=>"2019-02-02T06:53:25Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2014")
expect(subject.publisher).to eq("OpenEdition")
expect(subject.agency).to eq("Crossref")
+ expect(subject.date_registered).to be_nil
end
it "markup" do
input = "https://doi.org/10.1098/rspb.2017.0132"
subject = Bolognese::Metadata.new(input: input)
@@ -492,10 +496,11 @@
expect(subject.titles).to eq([{"title"=>"Sexual conflict and correlated evolution between male persistence and female resistance traits in the seed beetle <i>Callosobruchus maculatus</i>"}])
expect(subject.dates).to eq([{"date"=>"2017-05-24", "dateType"=>"Issued"}, {"date"=>"2017-05-24T09:13:39Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2017")
expect(subject.publisher).to eq("The Royal Society")
expect(subject.agency).to eq("Crossref")
+ expect(subject.date_registered).to eq("2017-05-24T02:10:18Z")
end
it "journal article with" do
input = "https://doi.org/10.1111/nph.14619"
subject = Bolognese::Metadata.new(input: input)
@@ -513,10 +518,11 @@
expect(subject.related_identifiers.length).to eq(49)
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"0028-646X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1002/pmic.201400530", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
expect(subject.container).to eq("firstPage"=>"929", "identifier"=>"0028-646X", "identifierType"=>"ISSN", "issue"=>"3", "lastPage"=>"935", "title"=>"New Phytologist", "type"=>"Journal", "volume"=>"218")
expect(subject.agency).to eq("Crossref")
+ expect(subject.date_registered).to eq("2018-08-03T11:45:49Z")
end
it "author literal" do
input = "https://doi.org/10.1038/ng.3834"
subject = Bolognese::Metadata.new(input: input)
@@ -529,9 +535,10 @@
expect(subject.titles).to eq([{"title"=>"The impact of structural variation on human gene expression"}])
expect(subject.dates).to eq([{"date"=>"2017-04-03", "dateType"=>"Issued"}, {"date"=>"2019-11-02T08:50:05Z", "dateType"=>"Updated"}])
expect(subject.publication_year).to eq("2017")
expect(subject.publisher).to eq("Springer Science and Business Media LLC")
expect(subject.agency).to eq("Crossref")
+ expect(subject.date_registered).to eq("2019-11-02T09:30:06Z")
end
it "journal issue" do
input = "https://doi.org/10.6002/ect.2015.0371"
subject = Bolognese::Metadata.new(input: input)