diff options
| author | Zog | 2018-01-22 11:05:09 +0100 |
|---|---|---|
| committer | Zog | 2018-01-22 11:05:09 +0100 |
| commit | 865e58859cb83da4e36d8502fc778d383c756c26 (patch) | |
| tree | 5b4444ac9b6f81a693dcf012e3403bb5c6a5f56c /spec | |
| parent | 761ad42ea0ec53a633cbb30d65acf041231e92ec (diff) | |
| download | chouette-core-5647-scope-custom-fields-validations.tar.bz2 | |
Refs #5647; Scope CustomField validations on workgroup5647-scope-custom-fields-validations
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/custom_field_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/custom_field_spec.rb b/spec/models/custom_field_spec.rb index 8a6d0cb41..51128b0a2 100644 --- a/spec/models/custom_field_spec.rb +++ b/spec/models/custom_field_spec.rb @@ -4,8 +4,8 @@ RSpec.describe CustomField, type: :model do let( :vj ){ create :vehicle_journey, custom_field_values: {energy: 99} } context "validates" do - it { should validate_uniqueness_of(:name).scoped_to(:resource_type) } - it { should validate_uniqueness_of(:code).scoped_to(:resource_type).case_insensitive } + it { should validate_uniqueness_of(:name).scoped_to(:resource_type, :workgroup_id) } + it { should validate_uniqueness_of(:code).scoped_to(:resource_type, :workgroup_id).case_insensitive } end context "field access" do |
