aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorZog2018-01-22 11:05:09 +0100
committercedricnjanga2018-01-31 07:16:22 -0800
commitd56aed95bcd9970bdc49477c2d5c59befbaeeefd (patch)
tree6b7fe3f3b9df7d56b12be05ee6372f614d2068d2 /spec
parentfe7915ffac359db41c7737a3847f31a728f502e6 (diff)
downloadchouette-core-d56aed95bcd9970bdc49477c2d5c59befbaeeefd.tar.bz2
Refs #5647; 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