Sha256: 43bcbc9c9e0c9b9e06e67ea7f91cb1994a2730ae9769f39346c72e8fa038e425

Contents?: true

Size: 764 Bytes

Versions: 102

Compression:

Stored size: 764 Bytes

Contents

require 'spec_helper'

describe Bolognese::Metadata, vcr: true do
  context "write metadata as crossref" do
    it "journal article" do
      input = fixture_path + 'crossref.xml'
      subject = Bolognese::Metadata.new(input: input)
      crossref = Maremma.from_xml(subject.crossref).dig("doi_records", "doi_record")
      expect(crossref.dig("crossref", "journal", "journal_metadata", "full_title")).to eq("PLoS ONE")
      expect(crossref.dig("crossref", "journal", "journal_article", "doi_data", "doi")).to eq("10.1371/journal.pone.0000030")
    end

    it "from DataCite" do
      input = "https://doi.org/10.5061/DRYAD.8515"
      subject = Bolognese::Metadata.new(input: input, from: "datacite")
      expect(subject.crossref).to be nil
    end
  end
end

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
bolognese-0.10.21 spec/writers/crossref_writer_spec.rb
bolognese-0.10.20 spec/writers/crossref_writer_spec.rb
bolognese-0.10.19 spec/writers/crossref_writer_spec.rb
bolognese-0.10.18 spec/writers/crossref_writer_spec.rb
bolognese-0.10.17 spec/writers/crossref_writer_spec.rb
bolognese-0.10.16 spec/writers/crossref_writer_spec.rb
bolognese-0.10.15 spec/writers/crossref_writer_spec.rb
bolognese-0.10.14 spec/writers/crossref_writer_spec.rb
bolognese-0.10.13 spec/writers/crossref_writer_spec.rb
bolognese-0.10.11 spec/writers/crossref_writer_spec.rb
bolognese-0.10.10 spec/writers/crossref_writer_spec.rb
bolognese-0.10.9 spec/writers/crossref_writer_spec.rb
bolognese-0.10.8 spec/writers/crossref_writer_spec.rb
bolognese-0.10.7 spec/writers/crossref_writer_spec.rb
bolognese-0.10.6 spec/writers/crossref_writer_spec.rb
bolognese-0.10.5 spec/writers/crossref_writer_spec.rb
bolognese-0.10.4 spec/writers/crossref_writer_spec.rb
bolognese-0.10.3 spec/writers/crossref_writer_spec.rb
bolognese-0.10.2 spec/writers/crossref_writer_spec.rb
bolognese-0.10 spec/writers/crossref_writer_spec.rb