diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-08 12:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-08 12:09:30 +0300 |
commit | 1c6e8c149861e1027da40622536b5276c46a7408 (patch) | |
tree | fe2c3e647536f8369d97ce224cfe3fc82d1efa8b /spec/models/dependency_proxy | |
parent | e9f7a727593f6df2f4ca837d2fcf8f401a2b2b31 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/dependency_proxy')
-rw-r--r-- | spec/models/dependency_proxy/manifest_spec.rb | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/spec/models/dependency_proxy/manifest_spec.rb b/spec/models/dependency_proxy/manifest_spec.rb index 4203644c003..aa2e73356dd 100644 --- a/spec/models/dependency_proxy/manifest_spec.rb +++ b/spec/models/dependency_proxy/manifest_spec.rb @@ -29,32 +29,24 @@ RSpec.describe DependencyProxy::Manifest, type: :model do end end - describe '.find_or_initialize_by_file_name_or_digest' do - let_it_be(:file_name) { 'foo' } - let_it_be(:digest) { 'bar' } - - subject { DependencyProxy::Manifest.find_or_initialize_by_file_name_or_digest(file_name: file_name, digest: digest) } + describe '.find_or_initialize_by_file_name' do + subject { DependencyProxy::Manifest.find_or_initialize_by_file_name(file_name) } context 'no manifest exists' do + let_it_be(:file_name) { 'foo' } + it 'initializes a manifest' do - expect(DependencyProxy::Manifest).to receive(:new).with(file_name: file_name, digest: digest) + expect(DependencyProxy::Manifest).to receive(:new).with(file_name: file_name) subject end end - context 'manifest exists and matches file_name' do + context 'manifest exists' do let_it_be(:dependency_proxy_manifest) { create(:dependency_proxy_manifest) } let_it_be(:file_name) { dependency_proxy_manifest.file_name } it { is_expected.to eq(dependency_proxy_manifest) } end - - context 'manifest exists and matches digest' do - let_it_be(:dependency_proxy_manifest) { create(:dependency_proxy_manifest) } - let_it_be(:digest) { dependency_proxy_manifest.digest } - - it { is_expected.to eq(dependency_proxy_manifest) } - end end end |