aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuc Donnet2018-01-30 17:01:48 +0100
committerGitHub2018-01-30 17:01:48 +0100
commit0506396d3ca91d169ac61ffc2e6f68bebd03cc55 (patch)
tree1544de7e9d68f0953629d0beb599c35c28144f44 /spec
parent3b05aca2a54906317bf57af7c0bd2fa624725900 (diff)
parent865e58859cb83da4e36d8502fc778d383c756c26 (diff)
downloadchouette-core-0506396d3ca91d169ac61ffc2e6f68bebd03cc55.tar.bz2
Merge pull request #251 from af83/5647-scope-custom-fields-validations
Scope CustomField validations on workgroup
Diffstat (limited to 'spec')
-rw-r--r--spec/models/custom_field_spec.rb4
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