diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
commit | ee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch) | |
tree | f8479f94a28f66654c6a4f6fb99bad6b4e86a40e /spec/lib/gitlab/diff/file_collection_sorter_spec.rb | |
parent | 62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff) |
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'spec/lib/gitlab/diff/file_collection_sorter_spec.rb')
-rw-r--r-- | spec/lib/gitlab/diff/file_collection_sorter_spec.rb | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/spec/lib/gitlab/diff/file_collection_sorter_spec.rb b/spec/lib/gitlab/diff/file_collection_sorter_spec.rb index ca9c156c1ad..3f0b0ad5775 100644 --- a/spec/lib/gitlab/diff/file_collection_sorter_spec.rb +++ b/spec/lib/gitlab/diff/file_collection_sorter_spec.rb @@ -33,27 +33,28 @@ RSpec.describe Gitlab::Diff::FileCollectionSorter do let(:sorted_files_paths) { subject.sort.map { |file| file.new_path.presence || file.old_path } } it 'returns list sorted directory first' do - expect(sorted_files_paths).to eq([ - '.dir/test', - '1-folder/nested/A-file.ext', - '1-folder/nested/M-file.ext', - '1-folder/nested/Z-file.ext', - '1-folder/A-file.ext', - '1-folder/M-file.ext', - '1-folder/README', - '1-folder/README', - '1-folder/Z-file.ext', - '2-folder/nested/A-file.ext', - '2-folder/A-file.ext', - '2-folder/M-file.ext', - '2-folder/Z-file.ext', - '.file', - 'A-file.ext', - 'M-file.ext', - 'README', - 'README', - 'Z-file.ext' - ]) + expect(sorted_files_paths).to eq( + [ + '.dir/test', + '1-folder/nested/A-file.ext', + '1-folder/nested/M-file.ext', + '1-folder/nested/Z-file.ext', + '1-folder/A-file.ext', + '1-folder/M-file.ext', + '1-folder/README', + '1-folder/README', + '1-folder/Z-file.ext', + '2-folder/nested/A-file.ext', + '2-folder/A-file.ext', + '2-folder/M-file.ext', + '2-folder/Z-file.ext', + '.file', + 'A-file.ext', + 'M-file.ext', + 'README', + 'README', + 'Z-file.ext' + ]) end end end |