spec/unit/datacite/mapping/rights_spec.rb in datacite-mapping-0.3.0 vs spec/unit/datacite/mapping/rights_spec.rb in datacite-mapping-0.4.0
- old
+ new
@@ -12,28 +12,15 @@
end
it 'sets the URI' do
rights = Rights.new(value: 'CC0 1.0 Universal', uri: URI('http://creativecommons.org/publicdomain/zero/1.0/'))
expect(rights.uri).to eq(URI('http://creativecommons.org/publicdomain/zero/1.0/'))
end
- it 'requires a value' do
- expect { Rights.new(uri: URI('http://creativecommons.org/publicdomain/zero/1.0/')) }.to raise_error(ArgumentError)
- end
end
describe '#value=' do
it 'sets the value' do
rights = Rights.allocate
rights.value = 'CC0 1.0 Universal'
- expect(rights.value).to eq('CC0 1.0 Universal')
- end
- it 'requires a value' do
- rights = Rights.new(value: 'CC0 1.0 Universal')
- expect { rights.value = nil }.to raise_error(ArgumentError)
- expect(rights.value).to eq('CC0 1.0 Universal')
- end
- it 'requires a non-empty value' do
- rights = Rights.new(value: 'CC0 1.0 Universal')
- expect { rights.value = '' }.to raise_error(ArgumentError)
expect(rights.value).to eq('CC0 1.0 Universal')
end
end
describe '#uri=' do