diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-21 12:06:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-21 12:06:22 +0300 |
commit | 6791eefead979110cc773720daee6e58c56483d9 (patch) | |
tree | 44a167ee57b1314481da4b73c4823875e64124e3 /spec/lib/gitlab/git | |
parent | 8e39b3a3afb6b01ce57819cb2cad5672ba88500e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/git')
-rw-r--r-- | spec/lib/gitlab/git/commit_spec.rb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb index 23651e3d7f2..cdab7127748 100644 --- a/spec/lib/gitlab/git/commit_spec.rb +++ b/spec/lib/gitlab/git/commit_spec.rb @@ -428,7 +428,9 @@ describe Gitlab::Git::Commit, :seed_helper do end end - shared_examples 'extracting commit signature' do + describe '.extract_signature_lazily' do + subject { described_class.extract_signature_lazily(repository, commit_id).itself } + context 'when the commit is signed' do let(:commit_id) { '0b4bc9a49b562e85de7cc9e834518ea6828729b9' } @@ -492,10 +494,8 @@ describe Gitlab::Git::Commit, :seed_helper do expect { subject }.to raise_error(ArgumentError) end end - end - describe '.extract_signature_lazily' do - describe 'loading signatures in batch once' do + context 'when loading signatures in batch once' do it 'fetches signatures in batch once' do commit_ids = %w[0b4bc9a49b562e85de7cc9e834518ea6828729b9 4b4918a572fa86f9771e5ba40fbd48e1eb03e2c6] signatures = commit_ids.map do |commit_id| @@ -516,16 +516,6 @@ describe Gitlab::Git::Commit, :seed_helper do 2.times { signatures.each(&:itself) } end end - - subject { described_class.extract_signature_lazily(repository, commit_id).itself } - - it_behaves_like 'extracting commit signature' - end - - describe '.extract_signature' do - subject { described_class.extract_signature(repository, commit_id) } - - it_behaves_like 'extracting commit signature' end end |