diff options
| author | Luc Donnet | 2017-12-23 08:49:28 +0100 | 
|---|---|---|
| committer | GitHub | 2017-12-23 08:49:28 +0100 | 
| commit | 9fe0ca13d7caba486561f52557c1fa3d2f9f0a52 (patch) | |
| tree | 590ff7afe9f061b5ad5836b10b7f59ed32fe1809 /spec/support | |
| parent | e29d22aa6402c10ab1712cad44316c8f034dd0e6 (diff) | |
| parent | 1d7a0cb4ce78603dac88c4054a658f02bf9fbb22 (diff) | |
| download | chouette-core-9fe0ca13d7caba486561f52557c1fa3d2f9f0a52.tar.bz2 | |
Merge pull request #161 from af83/5316-migrate-compliance-control-and-check-attributes-from-hs
5316 migrate compliance control and check attributes from hstore to json column type
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/shared_examples/compliance_control_validation.rb | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/spec/support/shared_examples/compliance_control_validation.rb b/spec/support/shared_examples/compliance_control_validation.rb index d4ab9f41d..c76712c4c 100644 --- a/spec/support/shared_examples/compliance_control_validation.rb +++ b/spec/support/shared_examples/compliance_control_validation.rb @@ -1,6 +1,9 @@  RSpec.shared_examples_for 'has min_max_values' do    context "is valid" do +    it { should validate_numericality_of(:minimum) } +    it { should validate_numericality_of(:maximum) } +      it 'if no value is provided' do        expect_it.to be_valid      end @@ -41,3 +44,10 @@ RSpec.shared_examples_for 'has min_max_values' do      end    end  end + + +RSpec.shared_examples_for "has target attribute" do +  context "is valid" do +    it { should validate_presence_of(:target) } +  end +end | 
