diff options
| author | cedricnjanga | 2017-10-24 19:10:11 +0200 |
|---|---|---|
| committer | cedricnjanga | 2017-10-24 19:10:11 +0200 |
| commit | a8ae0d3bf9105b17bfdb6dc22f527140f8edb6dd (patch) | |
| tree | 50bb2f3af42be39b85c17d070971b218c2b495a5 /spec/models | |
| parent | 545671efd71380722dbc3272f5f513ea684891bd (diff) | |
| parent | 2568e7f7553c82adb0bed1521ef9f013df9df87e (diff) | |
| download | chouette-core-a8ae0d3bf9105b17bfdb6dc22f527140f8edb6dd.tar.bz2 | |
Merge branch 'master' into staging
Diffstat (limited to 'spec/models')
| -rw-r--r-- | spec/models/compliance_control_validations/genric_attribute_validation/min_max_validation_spec.rb | 10 | ||||
| -rw-r--r-- | spec/models/import_spec.rb | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/spec/models/compliance_control_validations/genric_attribute_validation/min_max_validation_spec.rb b/spec/models/compliance_control_validations/genric_attribute_validation/min_max_validation_spec.rb index 276d09a92..4d30d61e3 100644 --- a/spec/models/compliance_control_validations/genric_attribute_validation/min_max_validation_spec.rb +++ b/spec/models/compliance_control_validations/genric_attribute_validation/min_max_validation_spec.rb @@ -1,8 +1,8 @@ -# RSpec.describe GenericAttributeControl::MinMax do +RSpec.describe GenericAttributeControl::MinMax do -# let( :factory ){ :generic_attribute_control_min_max } -# subject{ build factory } + let( :factory ){ :generic_attribute_control_min_max } + subject{ build factory } -# it_behaves_like 'has min_max_values' + it_behaves_like 'has min_max_values' -# end +end diff --git a/spec/models/import_spec.rb b/spec/models/import_spec.rb index cd5a30982..c06d05dab 100644 --- a/spec/models/import_spec.rb +++ b/spec/models/import_spec.rb @@ -10,6 +10,9 @@ RSpec.describe Import, type: :model do it { should validate_presence_of(:workbench) } it { should validate_presence_of(:creator) } + it { should allow_value('file.zip').for(:file).with_message(I18n.t('activerecord.errors.models.imports.wrong_file_extension')) } + it { should_not allow_values('file.json', 'file.png', 'file.pdf').for(:file) } + let(:workbench_import) { build_stubbed(:workbench_import) } let(:workbench_import_with_completed_steps) do workbench_import = build_stubbed( |
