diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-22 00:08:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-22 00:08:57 +0300 |
commit | a6c2be7cd20a9515b347e72d63c5b47bb9b79457 (patch) | |
tree | 568212b4debeb2a35bb1133209b98e1468d9ee85 /spec/models | |
parent | 74a2d57b337034cfdcd719615e4da06643b69114 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/lfs_object_spec.rb | 9 |
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 |