Sha256: da10fb9a19ae4336f2125c64045c9b105b1149a0daa047b74b50f274eb6b6ec3

Contents?: true

Size: 1.68 KB

Versions: 62

Compression:

Stored size: 1.68 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Bolognese::Metadata, vcr: true do
  context "write metadata as citation" do
    it "Journal article" do
      input = "10.7554/eLife.01567"
      subject = Bolognese::Metadata.new(input: input, from: "crossref")
      expect(subject.style).to eq("apa")
      expect(subject.locale).to eq("en-US")
      expect(subject.citation).to eq("Sankar, M., Nieminen, K., Ragni, L., Xenarios, I., &amp; Hardtke, C. S. (2014). Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth. <i>ELife</i>, <i>3</i>. https://doi.org/10.7554/elife.01567")
    end

    # it "Journal article vancouver style" do
    #   input = "10.7554/eLife.01567"
    #   subject = Bolognese::Metadata.new(input: input, from: "crossref", style: "vancouver", locale: "de-de")
    #   expect(subject.style).to eq("vancouver")
    #   expect(subject.locale).to eq("de-de")
    #   expect(subject.citation).to eq("Sankar M, Nieminen K, Ragni L, Xenarios I, Hardtke CS. Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth. eLife [Internet]. 11. Februar 2014;3. Verfügbar unter: https://elifesciences.org/articles/01567")
    # end

    it "Dataset" do
      input = "https://doi.org/10.5061/DRYAD.8515"
      subject = Bolognese::Metadata.new(input: input, from: "datacite")
      expect(subject.citation).to eq("Ollomo, B., Durand, P., Prugnolle, F., Douzery, E. J. P., Arnathau, C., Nkoghe, D., … Renaud, F. (2011). <i>Data from: A new malaria agent in African hominids.</i> (Version 1) [Data set]. Dryad Digital Repository. https://doi.org/10.5061/dryad.8515")
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
bolognese-1.2.9 spec/writers/citation_writer_spec.rb
bolognese-1.2.8 spec/writers/citation_writer_spec.rb
bolognese-1.2.7 spec/writers/citation_writer_spec.rb
bolognese-1.2.6 spec/writers/citation_writer_spec.rb
bolognese-1.2.5 spec/writers/citation_writer_spec.rb
bolognese-1.2.4 spec/writers/citation_writer_spec.rb
bolognese-1.2.3 spec/writers/citation_writer_spec.rb
bolognese-1.2.2 spec/writers/citation_writer_spec.rb
bolognese-1.2.1 spec/writers/citation_writer_spec.rb
bolognese-1.2 spec/writers/citation_writer_spec.rb
bolognese-1.1.17 spec/writers/citation_writer_spec.rb
bolognese-1.1.16 spec/writers/citation_writer_spec.rb
bolognese-1.1.15 spec/writers/citation_writer_spec.rb
bolognese-1.1.14 spec/writers/citation_writer_spec.rb
bolognese-1.1.13 spec/writers/citation_writer_spec.rb
bolognese-1.1.12 spec/writers/citation_writer_spec.rb
bolognese-1.1.11 spec/writers/citation_writer_spec.rb
bolognese-1.1.8 spec/writers/citation_writer_spec.rb
bolognese-1.1.7 spec/writers/citation_writer_spec.rb
bolognese-1.1.6 spec/writers/citation_writer_spec.rb