spec/writers/datacite_writer_spec.rb in bolognese-0.9.96 vs spec/writers/datacite_writer_spec.rb in bolognese-0.9.97

- old
+ new

@@ -96,11 +96,11 @@ it "Text pass-thru" do input = "https://doi.org/10.23640/07243.5153971" subject = Bolognese::Metadata.new(input: input, from: "datacite") expect(subject.valid?).to be true - expect(subject.id).to eq("https://doi.org/10.23640/07243.5153971") + expect(subject.identifier).to eq("https://doi.org/10.23640/07243.5153971") expect(subject.type).to eq("ScholarlyArticle") expect(subject.additional_type).to eq("Paper") expect(subject.resource_type_general).to eq("Text") expect(subject.author.length).to eq(20) expect(subject.author.first).to eq("type"=>"Person", "familyName" => "Paglione", "givenName" => "Laura", "id" => "https://orcid.org/0000-0003-3188-6273", "name" => "Laura Paglione") @@ -115,11 +115,11 @@ it "Text pass-thru with doi in options" do input = "https://doi.org/10.23640/07243.5153971" subject = Bolognese::Metadata.new(input: input, from: "datacite", doi: "10.5072/07243.5153971") expect(subject.valid?).to be true - expect(subject.id).to eq("https://doi.org/10.5072/07243.5153971") + expect(subject.identifier).to eq("https://doi.org/10.5072/07243.5153971") expect(subject.type).to eq("ScholarlyArticle") expect(subject.additional_type).to eq("Paper") expect(subject.resource_type_general).to eq("Text") expect(subject.author.length).to eq(20) expect(subject.author.first).to eq("type"=>"Person", "familyName" => "Paglione", "givenName" => "Laura", "id" => "https://orcid.org/0000-0003-3188-6273", "name" => "Laura Paglione") @@ -134,11 +134,11 @@ it "Dataset in schema 4.0" do input = "https://doi.org/10.5061/DRYAD.8515" subject = Bolognese::Metadata.new(input: input, from: "datacite", regenerate: true) expect(subject.valid?).to be true - expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515") + expect(subject.identifier).to eq("https://doi.org/10.5061/dryad.8515") expect(subject.type).to eq("Dataset") expect(subject.additional_type).to eq("DataPackage") expect(subject.resource_type_general).to eq("Dataset") expect(subject.author.length).to eq(8) expect(subject.author.first).to eq("type"=>"Person", "name"=>"Benjamin Ollomo", "givenName"=>"Benjamin", "familyName"=>"Ollomo") @@ -169,10 +169,10 @@ it "DOI not found" do input = "https://doi.org/10.4124/05F6C379-DD68-4CDB-880D-33D3E9576D52/1" subject = Bolognese::Metadata.new(input: input, from: "datacite") expect(subject.valid?).to be false - expect(subject.id).to eq("https://doi.org/10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1") + expect(subject.identifier).to eq("https://doi.org/10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1") expect(subject.doi).to eq("10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1") expect(subject.service_provider).to eq("DataCite") expect(subject.state).to eq("not_found") expect(subject.datacite).to be_nil end