Sha256: ef89552d959c87cc75bdb5c8e1c7eec06af15bb6c1cbe531720317a77c8bae09
Contents?: true
Size: 869 Bytes
Versions: 1
Compression:
Stored size: 869 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe Pupa::Concerns::Identifiable do let :klass do Class.new do include Pupa::Model include Pupa::Concerns::Identifiable end end 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 it 'should not add an identifier without an identifier' do object.add_identifier(nil) object.identifiers.blank?.should == true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pupa-0.0.9 | spec/models/concerns/identifiable_spec.rb |