aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/import_spec.rb
diff options
context:
space:
mode:
authorcedricnjanga2017-10-24 17:27:54 +0200
committercedricnjanga2017-10-24 17:29:23 +0200
commitf4aa0048c144e4d382184213f76ace9f4109577d (patch)
tree6bf8de365753f188449461912c720fd3914ece64 /spec/models/import_spec.rb
parente320af5640575efdf599244d48308d7afd114729 (diff)
downloadchouette-core-f4aa0048c144e4d382184213f76ace9f4109577d.tar.bz2
Fix error on build due to missing translation
Diffstat (limited to 'spec/models/import_spec.rb')
-rw-r--r--spec/models/import_spec.rb3
1 files changed, 3 insertions, 0 deletions
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(