From 34e463ce7ae08a08c8106e68544ddf43cc378c8d Mon Sep 17 00:00:00 2001 From: Zog Date: Tue, 13 Mar 2018 14:59:27 +0100 Subject: Refs #6106 Refs #6107 Binds LineReferentials and StopAreaReferentials to Workgroups, and enforce uniqueness --- spec/models/workgroup_spec.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spec') diff --git a/spec/models/workgroup_spec.rb b/spec/models/workgroup_spec.rb index ac8d3fc98..97fff3d86 100644 --- a/spec/models/workgroup_spec.rb +++ b/spec/models/workgroup_spec.rb @@ -6,6 +6,8 @@ RSpec.describe Workgroup, type: :model do it{ should have_many(:workbenches) } it{ should validate_uniqueness_of(:name) } + it{ should validate_uniqueness_of(:stop_area_referential_id) } + it{ should validate_uniqueness_of(:line_referential_id) } it 'is not valid without a stop_area_referential' do workgroup.stop_area_referential_id = nil -- cgit v1.2.3