Sha256: 60441245fb4c9e31b2159fc4ee6111691a283bfa1e02b628f06b352233fd0c1c
Contents?: true
Size: 1.26 KB
Versions: 5
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 3259-2008', 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 3259-2018', 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
5 entries across 5 versions & 1 rubygems