spec/readers/codemeta_reader_spec.rb in bolognese-1.6.12 vs spec/readers/codemeta_reader_spec.rb in bolognese-1.7.1
- old
+ new
@@ -16,11 +16,11 @@
end
context "get codemeta metadata" do
it "maremma" do
expect(subject.valid?).to be true
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/qeg0-3gm3", "identifierType"=>"DOI"}])
+ expect(subject.id).to eq("https://doi.org/10.5438/qeg0-3gm3")
expect(subject.url).to eq("https://github.com/datacite/maremma")
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"DataCite"}],
"familyName"=>"Fenner",
"givenName"=>"Martin",
@@ -44,11 +44,11 @@
end
it "rdataone" do
input = fixture_path + 'codemeta.json'
subject = Bolognese::Metadata.new(input: input)
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5063/f1m61h5x", "identifierType"=>"DOI"}])
+ expect(subject.id).to eq("https://doi.org/10.5063/f1m61h5x")
expect(subject.url).to eq("https://github.com/DataONEorg/rdataone")
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"NCEAS"}],
"familyName"=>"Jones",
"givenName"=>"Matt",
@@ -86,11 +86,11 @@
it "maremma" do
input = fixture_path + 'maremma/codemeta.json'
subject = Bolognese::Metadata.new(input: input)
expect(subject.valid?).to be true
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/qeg0-3gm3", "identifierType"=>"DOI"}])
+ expect(subject.id).to eq("https://doi.org/10.5438/qeg0-3gm3")
expect(subject.url).to eq("https://github.com/datacite/maremma")
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"DataCite"}],
"familyName"=>"Fenner",
"givenName"=>"Martin",
@@ -115,10 +115,10 @@
it "metadata_reports" do
input = "https://github.com/datacite/metadata-reports/blob/master/software/codemeta.json"
subject = Bolognese::Metadata.new(input: input)
expect(subject.valid?).to be true
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/wr0x-e194", "identifierType"=>"DOI"}])
+ expect(subject.id).to eq("https://doi.org/10.5438/wr0x-e194")
expect(subject.url).to eq("https://github.com/datacite/metadata-reports")
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode")
expect(subject.creators.size).to eq(4)
expect(subject.creators.last).to eq("familyName" => "Nielsen", "givenName" => "Lars Holm","name" => "Nielsen, Lars Holm", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0001-8135-3489", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "nameType" => "Personal", "affiliation" => [])
expect(subject.titles).to eq([{"title"=>"DOI Registrations for Software"}])