Sha256: cb0012d77da706e295b99997ed428a06bd37d25f22389fdc8c6a8859df2ab6fa
Contents?: true
Size: 1.26 KB
Versions: 3
Compression:
Stored size: 1.26 KB
Contents
describe Unidom::Standard::StandardAssociating, type: :model do before :each do end after :each do end context do model_attributes = { source_id: SecureRandom.uuid, target_id: SecureRandom.uuid, association_code: 'REVS' } it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes source_standard_attributes = { name: 'Source Name', number: 'GB/T 8888-000', ics_code: '11-23-68', published_on: Date.current-20.years, applied_on: Date.current, obsoleted_on: Date.current+1.year } target_standard_attributes = { name: 'Target Name', number: 'GB/T 8888-001', ics_code: '11-23-68', published_on: Date.current+1.year, applied_on: Date.current, obsoleted_on: Date.current+20.years } it_behaves_like 'belongs_to', model_attributes, :source, Unidom::Standard::Standard, source_standard_attributes it_behaves_like 'belongs_to', model_attributes, :target, Unidom::Standard::Standard, target_standard_attributes it_behaves_like 'monomorphic scope', model_attributes, :source_is, :source it_behaves_like 'monomorphic scope', model_attributes, :target_is, :target end end
Version data entries
3 entries across 3 versions & 1 rubygems