Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2168dac3
Commit
2168dac3
authored
Oct 18, 2019
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unshared specs into contexts for signature tests
parent
72f542fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
spec/lib/gitlab/git/commit_spec.rb
spec/lib/gitlab/git/commit_spec.rb
+4
-8
No files found.
spec/lib/gitlab/git/commit_spec.rb
View file @
2168dac3
...
...
@@ -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,10 +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
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment