diff options
Diffstat (limited to 'spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb')
-rw-r--r-- | spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb index 0799a33f856..981d7027a17 100644 --- a/spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb @@ -34,10 +34,24 @@ RSpec.describe Projects::LfsPointers::LfsObjectDownloadListService do subject.execute end - it 'retrieves the download links of non existent objects' do - expect_any_instance_of(Projects::LfsPointers::LfsDownloadLinkListService).to receive(:execute).with(all_oids) + context 'when no LFS objects exist' do + before do + project.lfs_objects.delete_all + end - subject.execute + it 'retrieves all LFS objects' do + expect_any_instance_of(Projects::LfsPointers::LfsDownloadLinkListService).to receive(:execute).with(all_oids) + + subject.execute + end + end + + context 'when some LFS objects already exist' do + it 'retrieves the download links of non-existent objects' do + expect_any_instance_of(Projects::LfsPointers::LfsDownloadLinkListService).to receive(:execute).with(oids) + + subject.execute + end end end |