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>2019-10-21 12:06:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-21 12:06:22 +0300
commit6791eefead979110cc773720daee6e58c56483d9 (patch)
tree44a167ee57b1314481da4b73c4823875e64124e3 /spec/lib/gitlab/git
parent8e39b3a3afb6b01ce57819cb2cad5672ba88500e (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.rb18
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