summaryrefslogtreecommitdiff
path: root/spec/models/ci/unit_test_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/ci/unit_test_spec.rb')
-rw-r--r--spec/models/ci/unit_test_spec.rb40
1 files changed, 21 insertions, 19 deletions
diff --git a/spec/models/ci/unit_test_spec.rb b/spec/models/ci/unit_test_spec.rb
index 556cf93c266..b3180492a36 100644
--- a/spec/models/ci/unit_test_spec.rb
+++ b/spec/models/ci/unit_test_spec.rb
@@ -43,18 +43,19 @@ RSpec.describe Ci::UnitTest do
result = described_class.find_or_create_by_batch(project, attrs)
- expect(result).to match_array([
- have_attributes(
- key_hash: existing_test.key_hash,
- suite_name: 'rspec',
- name: 'Math#sum adds numbers'
- ),
- have_attributes(
- key_hash: new_key,
- suite_name: 'jest',
- name: 'Component works'
- )
- ])
+ expect(result).to match_array(
+ [
+ have_attributes(
+ key_hash: existing_test.key_hash,
+ suite_name: 'rspec',
+ name: 'Math#sum adds numbers'
+ ),
+ have_attributes(
+ key_hash: new_key,
+ suite_name: 'jest',
+ name: 'Component works'
+ )
+ ])
expect(result).to all(be_persisted)
end
@@ -77,13 +78,14 @@ RSpec.describe Ci::UnitTest do
result = described_class.find_or_create_by_batch(project, attrs)
- expect(result).to match_array([
- have_attributes(
- key_hash: new_key,
- suite_name: 'abc...',
- name: 'abc...'
- )
- ])
+ expect(result).to match_array(
+ [
+ have_attributes(
+ key_hash: new_key,
+ suite_name: 'abc...',
+ name: 'abc...'
+ )
+ ])
expect(result).to all(be_persisted)
end