spec/unit/datacite/mapping/identifier_spec.rb in datacite-mapping-0.1.17.2 vs spec/unit/datacite/mapping/identifier_spec.rb in datacite-mapping-0.2.0
- old
+ new
@@ -30,9 +30,18 @@
)
bad_dois.each do |doi|
expect { Identifier.new(value: doi) }.to raise_error(ArgumentError)
end
end
+
+ it 'strips' do
+ value = '10.14749/1407399495'
+ id = Identifier.new(value: "
+ #{value}
+ ")
+ expect(id.value).to eq(value)
+ end
+
end
describe '#from_doi' do
it 'creates an identifier from a doi: string' do
doi_value = '10.1594/WDCC/CCSRNIES_SRES_B2'