diff options
| author | Robert | 2017-10-31 19:08:35 +0100 |
|---|---|---|
| committer | Robert | 2017-10-31 19:08:35 +0100 |
| commit | 63f3a7838140b2cac5dfca7cc80cb78f2c369c69 (patch) | |
| tree | cd0c388c12e7486d543fa5dbcf8ac91982f14f52 /spec | |
| parent | 050b6ff9b767b962361c0d935130da57fe05549a (diff) | |
| parent | b3c941878c8b2224449e7e185d9ea5c7537f0c69 (diff) | |
| download | chouette-core-63f3a7838140b2cac5dfca7cc80cb78f2c369c69.tar.bz2 | |
Merge branch 'master' of github.com:af83/stif-boiv
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/workers/workbench_import/workbench_import_with_corrupt_zip_spec.rb | 3 | ||||
| -rw-r--r-- | spec/workers/workbench_import/workbench_import_worker_spec.rb | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/spec/workers/workbench_import/workbench_import_with_corrupt_zip_spec.rb b/spec/workers/workbench_import/workbench_import_with_corrupt_zip_spec.rb index 5e34b208a..47626f5a1 100644 --- a/spec/workers/workbench_import/workbench_import_with_corrupt_zip_spec.rb +++ b/spec/workers/workbench_import/workbench_import_with_corrupt_zip_spec.rb @@ -1,6 +1,5 @@ RSpec.describe WorkbenchImportWorker do - shared_examples_for 'corrupt zipfile data' do subject { described_class.new } let( :workbench_import ){ create :workbench_import, status: :pending } @@ -23,7 +22,7 @@ RSpec.describe WorkbenchImportWorker do message = workbench_import.messages.last expect( message.criticity ).to eq('error') expect( message.message_key ).to eq('corrupt_zip_file') - expect( message.message_attributes ).to eq( 'import_name' => workbench_import.name ) + expect( message.message_attributes ).to eq( 'source_filename' => workbench_import.file.file.file ) end it 'does not change current step' do diff --git a/spec/workers/workbench_import/workbench_import_worker_spec.rb b/spec/workers/workbench_import/workbench_import_worker_spec.rb index deaa1e3a5..47ca2b4ff 100644 --- a/spec/workers/workbench_import/workbench_import_worker_spec.rb +++ b/spec/workers/workbench_import/workbench_import_worker_spec.rb @@ -115,8 +115,8 @@ RSpec.describe WorkbenchImportWorker, type: [:worker, :request] do let( :spurious ){ [spurious1, spurious2] } let( :messages ){ double('messages') } let( :message_attributes ){{criticity: :warning, message_key: 'inconsistent_zip_file'}} - let( :message1_attributes ){ message_attributes.merge(message_attributes: {'import_name' => import.name, 'spurious_dirs' => spurious1.join(', ')}) } - let( :message2_attributes ){ message_attributes.merge(message_attributes: {'import_name' => import.name, 'spurious_dirs' => spurious2.join(', ')}) } + let( :message1_attributes ){ message_attributes.merge(message_attributes: {'source_filename' => import.file.file.file, 'spurious_dirs' => spurious1.join(', ')}) } + let( :message2_attributes ){ message_attributes.merge(message_attributes: {'source_filename' => import.file.file.file, 'spurious_dirs' => spurious2.join(', ')}) } before do allow(import).to receive(:messages).and_return(messages) |
