aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/import_spec.rb
diff options
context:
space:
mode:
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(