diff options
Diffstat (limited to 'spec/lib/gitlab/import_export/import_test_coverage_spec.rb')
-rw-r--r-- | spec/lib/gitlab/import_export/import_test_coverage_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb index 51c0008b2b4..b1f5574fba1 100644 --- a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb +++ b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb @@ -96,11 +96,11 @@ RSpec.describe 'Test coverage of the Project Import' do case item when Hash item.each do |k, v| - if (v.is_a?(Array) || v.is_a?(Hash)) && v.present? - new_path = path + [k] - res << new_path - gather_relations(v, res, new_path) - end + next unless (v.is_a?(Array) || v.is_a?(Hash)) && v.present? + + new_path = path + [k] + res << new_path + gather_relations(v, res, new_path) end when Array item.each { |i| gather_relations(i, res, path) } |