diff options
| author | Xinhui | 2017-08-16 16:35:17 +0200 |
|---|---|---|
| committer | Xinhui | 2017-08-16 17:10:04 +0200 |
| commit | aea07f1fec58444bbc0b7c876d6dacddbe43bbcf (patch) | |
| tree | fe081ad92da89f5baf801e9b28e745ccbfe74dd5 /spec | |
| parent | cbb90d47fd539025180efb9d79262a9d4f2674be (diff) | |
| download | chouette-core-aea07f1fec58444bbc0b7c876d6dacddbe43bbcf.tar.bz2 | |
Import validate presence of creator
Refs #4270
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/factories/imports.rb | 1 | ||||
| -rw-r--r-- | spec/models/import_spec.rb | 1 |
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 |
