spec/isodoc/metadata_spec.rb in isodoc-0.9.8 vs spec/isodoc/metadata_spec.rb in isodoc-0.9.9

- old
+ new

@@ -10,14 +10,12 @@ expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort]).to be_equivalent_to <<~"OUTPUT" <iso-standard xmlns="http://riboseinc.com/isoxml"> <bibdata type="international-standard"> <title>The Incredible Mr Ripley</title> <title language="en">Cereals and pulses</title> - <docidentifier> - <project-number part="1">17301</project-number> - <tc-document-number>17301</tc-document-number> - </docidentifier> + <docidentifier>17301-1</docidentifier> + <docnumber>17301</docnumber> <date type="published"><on>2011</on></date> <date type="accessed"><on>2012</on></date> <date type="created"><from>2010</from><to>2011</to></date> <date type="activated"><on>2013</on></date> <date type="obsoleted"><on>2014</on></date> @@ -55,11 +53,11 @@ <revision-date>2016-05-01</revision-date> <draft>0.4</draft> </version> </iso-standard> INPUT -{:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :confirmeddate=>"XXX", :createddate=>"2010&ndash;2011", :docnumber=>"17301-1 Committee draft", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :status=>"Committee draft", :tc=>"TC 34", :updateddate=>"XXX", :wg=>"WG 3"} +{:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :confirmeddate=>"XXX", :createddate=>"2010&ndash;2011", :docnumber=>"17301-1", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :status=>"Committee draft", :tc=>"TC 34", :updateddate=>"XXX", :wg=>"WG 3"} OUTPUT end it "processes IsoXML metadata" do c = IsoDoc::Convert.new({}) @@ -69,13 +67,11 @@ expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort]).to be_equivalent_to <<~"OUTPUT" <iso-standard xmlns="http://riboseinc.com/isoxml"> <bibdata type="international-standard"> <title language="fr" format="text/plain">Céréales et légumineuses</ti> <title language="en" format="text/plain">Cereals and pulses</title> - <docidentifier> - <project-number part="1" subpart="3">17301</project-number> - <tc-document-number>17301</tc-document-number> - </docidentifier> + <docidentifier>17301-1-3</docidentifier> + <docnumber>17301</docnumber> <contributor> <role type="author"/> <organization> <name>ISO</name> </organization>