Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/models/concerns/bulk_insert_safe_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/models/concerns/bulk_insert_safe_shared_examples.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/shared_examples/models/concerns/bulk_insert_safe_shared_examples.rb b/spec/support/shared_examples/models/concerns/bulk_insert_safe_shared_examples.rb
index c6180a5a196..7bcd6191f1d 100644
--- a/spec/support/shared_examples/models/concerns/bulk_insert_safe_shared_examples.rb
+++ b/spec/support/shared_examples/models/concerns/bulk_insert_safe_shared_examples.rb
@@ -45,11 +45,11 @@ RSpec.shared_examples 'a BulkInsertSafe model' do |klass|
expect { target_class.bulk_insert!(items) }.to change { target_class.count }.by(items.size)
end
- it 'returns true' do
+ it 'returns an empty array' do
items = valid_items_for_bulk_insertion
expect(items).not_to be_empty
- expect(target_class.bulk_insert!(items)).to be true
+ expect(target_class.bulk_insert!(items)).to eq([])
end
end
@@ -69,7 +69,7 @@ RSpec.shared_examples 'a BulkInsertSafe model' do |klass|
# it is not always possible to create invalid items
if items.any?
- expect(target_class.bulk_insert!(items, validate: false)).to be(true)
+ expect(target_class.bulk_insert!(items, validate: false)).to eq([])
expect(target_class.count).to eq(items.size)
end
end