spec/models/concerns/identifiable_spec.rb in pupa-0.0.5 vs spec/models/concerns/identifiable_spec.rb in pupa-0.0.6
- old
+ new
@@ -9,9 +9,16 @@
let :object do
klass.new
end
+ describe '#identifiers=' do
+ it 'should use coerce to a IdentifierList' do
+ object.identifiers = [{identifier: '123456789', scheme: 'DUNS'}]
+ object.identifiers.should be_a(Pupa::IdentifierList)
+ end
+ end
+
describe '#add_identifier' do
it 'should add an identifier' do
object.add_identifier('123456789', scheme: 'duns')
object.identifiers.should == [{identifier: '123456789', scheme: 'duns'}]
end