Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5013f3a8
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5013f3a8
编写于
6月 26, 2017
作者:
A
Alexis Reigel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use updated gitlab-test repo for signed commits
上级
afd7582a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
19 deletion
+6
-19
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+5
-19
spec/support/test_env.rb
spec/support/test_env.rb
+1
-0
未找到文件。
spec/features/commits_spec.rb
浏览文件 @
5013f3a8
require
'spec_helper'
require
'fileutils'
describe
'Commits'
do
include
CiStatusHelper
...
...
@@ -206,19 +205,6 @@ describe 'Commits' do
end
describe
'GPG signed commits'
do
before
do
# 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
.
primary_keyid
}
--allow-empty -m "signed commit by nannie bernhard"`
`git commit --quiet -S
#{
GpgHelpers
::
User2
.
primary_keyid
}
--allow-empty -m "signed commit by bette cartwright"`
`git push --quiet`
end
end
end
it
'changes from unverified to verified when the user changes his email to match the gpg key'
do
user
=
create
:user
,
email:
'unrelated.user@example.org'
project
.
team
<<
[
user
,
:master
]
...
...
@@ -229,7 +215,7 @@ describe 'Commits' do
login_with
(
user
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
...
...
@@ -242,7 +228,7 @@ describe 'Commits' do
user
.
update_attributes!
(
email:
GpgHelpers
::
User1
.
emails
.
first
)
end
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
...
...
@@ -256,7 +242,7 @@ describe 'Commits' do
login_with
(
user
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
...
...
@@ -268,7 +254,7 @@ describe 'Commits' do
create
:gpg_key
,
key:
GpgHelpers
::
User1
.
public_key
,
user:
user
end
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
...
...
@@ -284,7 +270,7 @@ describe 'Commits' do
end
login_with
(
user
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
click_on
'Verified'
within
'.popover'
do
...
...
spec/support/test_env.rb
浏览文件 @
5013f3a8
...
...
@@ -5,6 +5,7 @@ module TestEnv
# When developing the seed repository, comment out the branch you will modify.
BRANCH_SHA
=
{
'signed-commits'
=>
'5d4a1cb'
,
'not-merged-branch'
=>
'b83d6e3'
,
'branch-merged'
=>
'498214d'
,
'empty-branch'
=>
'7efb185'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录