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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-22 00:08:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-22 00:08:57 +0300
commita6c2be7cd20a9515b347e72d63c5b47bb9b79457 (patch)
tree568212b4debeb2a35bb1133209b98e1468d9ee85 /spec/models
parent74a2d57b337034cfdcd719615e4da06643b69114 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/lfs_object_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/lfs_object_spec.rb b/spec/models/lfs_object_spec.rb
index 51713906d06..09a64dabb08 100644
--- a/spec/models/lfs_object_spec.rb
+++ b/spec/models/lfs_object_spec.rb
@@ -13,6 +13,15 @@ describe LfsObject do
expect(described_class.not_linked_to_project(project)).to contain_exactly(other_lfs_object)
end
end
+
+ describe '.for_oids' do
+ it 'returns the correct LfsObjects' do
+ lfs_object_1, lfs_object_2 = create_list(:lfs_object, 2)
+
+ expect(described_class.for_oids(lfs_object_1.oid)).to contain_exactly(lfs_object_1)
+ expect(described_class.for_oids([lfs_object_1.oid, lfs_object_2.oid])).to contain_exactly(lfs_object_1, lfs_object_2)
+ end
+ end
end
it 'has a distinct has_many :projects relation through lfs_objects_projects' do