aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorXinhui2017-08-16 16:35:17 +0200
committerXinhui2017-08-16 17:10:04 +0200
commitaea07f1fec58444bbc0b7c876d6dacddbe43bbcf (patch)
treefe081ad92da89f5baf801e9b28e745ccbfe74dd5 /spec
parentcbb90d47fd539025180efb9d79262a9d4f2674be (diff)
downloadchouette-core-aea07f1fec58444bbc0b7c876d6dacddbe43bbcf.tar.bz2
Import validate presence of creator
Refs #4270
Diffstat (limited to 'spec')
-rw-r--r--spec/factories/imports.rb1
-rw-r--r--spec/models/import_spec.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/spec/factories/imports.rb b/spec/factories/imports.rb
index afced3b57..2c53106c3 100644
--- a/spec/factories/imports.rb
+++ b/spec/factories/imports.rb
@@ -9,6 +9,7 @@ FactoryGirl.define do
status :new
started_at nil
ended_at nil
+ creator 'rspec'
after(:build) do |import|
import.class.skip_callback(:create, :before, :initialize_fields)
diff --git a/spec/models/import_spec.rb b/spec/models/import_spec.rb
index 164769fd5..6530b3f54 100644
--- a/spec/models/import_spec.rb
+++ b/spec/models/import_spec.rb
@@ -9,6 +9,7 @@ RSpec.describe Import, :type => :model do
it { should validate_presence_of(:file) }
it { should validate_presence_of(:referential) }
it { should validate_presence_of(:workbench) }
+ it { should validate_presence_of(:creator) }
let(:workbench_import) { build_stubbed(:workbench_import) }
let(:workbench_import_with_completed_steps) do