spec/unit/datacite/mapping/rights_spec.rb in datacite-mapping-0.1.0 vs spec/unit/datacite/mapping/rights_spec.rb in datacite-mapping-0.1.1
- old
+ new
@@ -49,20 +49,18 @@
end
describe '#load_from_xml' do
it 'reads XML' do
xml_text = '<rights rightsURI="http://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0 Universal</rights>'
- xml = REXML::Document.new(xml_text).root
- rights = Rights.load_from_xml(xml)
+ rights = Rights.parse_xml(xml_text)
expect(rights.value).to eq('CC0 1.0 Universal')
expect(rights.uri).to eq(URI('http://creativecommons.org/publicdomain/zero/1.0/'))
end
it 'trims the value' do
xml_text = '<rights>
CC0 1.0 Universal
</rights>'
- xml = REXML::Document.new(xml_text).root
- rights = Rights.load_from_xml(xml)
+ rights = Rights.parse_xml(xml_text)
expect(rights.value).to eq('CC0 1.0 Universal')
end
end
describe '#save_to_xml' do