aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/compliance_control_spec.rb2
-rw-r--r--spec/models/generic_attribute_control/min_max_spec.rb8
-rw-r--r--spec/models/generic_attribute_control/parent_class_spec.rb8
-rw-r--r--spec/models/generic_attribute_control/pattern_spec.rb8
-rw-r--r--spec/models/generic_attribute_control/uniqueness_spec.rb8
5 files changed, 32 insertions, 2 deletions
diff --git a/spec/models/compliance_control_spec.rb b/spec/models/compliance_control_spec.rb
index 0fc830021..50c2b7b8d 100644
--- a/spec/models/compliance_control_spec.rb
+++ b/spec/models/compliance_control_spec.rb
@@ -1,5 +1,3 @@
-require 'rails_helper'
-
RSpec.describe ComplianceControl, type: :model do
let(:compliance_control) { create :compliance_control }
diff --git a/spec/models/generic_attribute_control/min_max_spec.rb b/spec/models/generic_attribute_control/min_max_spec.rb
new file mode 100644
index 000000000..5eb8ed74e
--- /dev/null
+++ b/spec/models/generic_attribute_control/min_max_spec.rb
@@ -0,0 +1,8 @@
+RSpec.describe GenericAttributeControl::MinMax do
+ context 'class attributes' do
+ it 'are correctly set' do
+ expect( described_class.default_criticity ).to eq(:warning)
+ expect( described_class.default_code).to eq("3-Generic-2")
+ end
+ end
+end
diff --git a/spec/models/generic_attribute_control/parent_class_spec.rb b/spec/models/generic_attribute_control/parent_class_spec.rb
new file mode 100644
index 000000000..be60f71be
--- /dev/null
+++ b/spec/models/generic_attribute_control/parent_class_spec.rb
@@ -0,0 +1,8 @@
+RSpec.describe ComplianceControl do
+ context 'class attributes' do
+ it 'are correctly set' do
+ expect( described_class.default_criticity ).to eq( :warning )
+ expect( described_class.default_code ).to eq( "" )
+ end
+ end
+end
diff --git a/spec/models/generic_attribute_control/pattern_spec.rb b/spec/models/generic_attribute_control/pattern_spec.rb
new file mode 100644
index 000000000..d1f2dcb5f
--- /dev/null
+++ b/spec/models/generic_attribute_control/pattern_spec.rb
@@ -0,0 +1,8 @@
+RSpec.describe GenericAttributeControl::Pattern do
+ context 'class attributes' do
+ it 'are correctly set' do
+ expect( described_class.default_criticity ).to eq( :warning )
+ expect( described_class.default_code ).to eq( "3-Generic-3" )
+ end
+ end
+end
diff --git a/spec/models/generic_attribute_control/uniqueness_spec.rb b/spec/models/generic_attribute_control/uniqueness_spec.rb
new file mode 100644
index 000000000..dbf4feff4
--- /dev/null
+++ b/spec/models/generic_attribute_control/uniqueness_spec.rb
@@ -0,0 +1,8 @@
+RSpec.describe GenericAttributeControl::Uniqueness do
+ context 'class attributes' do
+ it 'are correctly set' do
+ expect( described_class.default_criticity ).to eq( :warning )
+ expect( described_class.default_code ).to eq( "3-Generic-3" )
+ end
+ end
+end