lib/rspec/models/unidom/position/occupation_spec.rb in unidom-position-1.5.1 vs lib/rspec/models/unidom/position/occupation_spec.rb in unidom-position-1.5.2

- old
+ new

@@ -28,8 +28,22 @@ { name: 'AAA' } => 0, { name: 'A'*(name_max_length-1) } => 0, { name: 'A'*name_max_length } => 0, { name: 'A'*(name_max_length+1) } => 1 + position_1_attributes = { + organization_id: SecureRandom.uuid, + organization_type: 'Unidom::Position::Organization::Mock', + name: 'Some Position #1' + } + + position_2_attributes = { + organization_id: SecureRandom.uuid, + organization_type: 'Unidom::Position::Organization::Mock', + name: 'Some Position #2' + } + + it_behaves_like 'has_many', model_attributes, :positions, Unidom::Position::Position, [ position_1_attributes, position_2_attributes ] + end end