Sha256: b2236c1b5c22be35170d2f28f51e20c43d6ad1f6f0b73d7d009c64d9f488d1e5
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 KB
Contents
# frozen_string_literal: true require 'spec_helper' describe Bolognese::Metadata, vcr: true do let(:input) { fixture_path + "citeproc.json" } subject { Bolognese::Metadata.new(input: input, from: "citeproc") } context "get citeproc raw" do it "BlogPosting" do expect(subject.raw).to eq(IO.read(input).strip) end end context "get citeproc metadata" do it "BlogPosting" do expect(subject.valid?).to be true expect(subject.identifier).to eq("https://doi.org/10.5438/4k3m-nyvg") expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food") expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"post-weblog", "resource_type_general"=>"Text", "ris"=>"GEN", "type"=>"BlogPosting") expect(subject.creator).to eq("type"=>"Person", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner") expect(subject.title).to eq("Eating your own Dog Food") expect(subject.description["text"]).to start_with("Eating your own dog food") expect(subject.dates).to eq([{"date"=>"2016-12-20", "date_type"=>"Issued"}]) expect(subject.publication_year).to eq("2016") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bolognese-1.0.3 | spec/readers/citeproc_reader_spec.rb |