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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
597ae6e2
Commit
597ae6e2
authored
Feb 23, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature spec for gpg signed commits
parent
eb77e106
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+32
-0
No files found.
spec/features/commits_spec.rb
View file @
597ae6e2
require
'spec_helper'
require
'fileutils'
describe
'Commits'
do
include
CiStatusHelper
...
...
@@ -203,4 +204,35 @@ describe 'Commits' do
end
end
end
describe
'GPG signed commits'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
project
.
team
<<
[
user
,
:master
]
login_with
(
user
)
end
it
'shows the signed status'
,
:gpg
do
GPGME
::
Key
.
import
(
GpgHelpers
::
User1
.
public_key
)
# FIXME: add this to the test repository directly
remote_path
=
project
.
repository
.
path_to_repo
Dir
.
mktmpdir
do
|
dir
|
FileUtils
.
cd
dir
do
`git clone --quiet
#{
remote_path
}
.`
`git commit --quiet -S
#{
GpgHelpers
::
User1
.
key_id
}
--allow-empty -m "signed commit, verified key/email"`
`git commit --quiet -S
#{
GpgHelpers
::
User2
.
key_id
}
--allow-empty -m "signed commit, unverified key/email"`
`git push --quiet`
end
end
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:master
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
expect
(
page
).
to
have_content
'Verified'
end
end
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