Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
cc8b8a60
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,发现更多精彩内容 >>
提交
cc8b8a60
编写于
9月 26, 2018
作者:
S
Shinya Maeda
提交者:
Alessio Caiazza
10月 02, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add unit spec for Ci::Pipeline
上级
9266cd5e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
0 deletion
+25
-0
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+25
-0
未找到文件。
spec/models/ci/pipeline_spec.rb
浏览文件 @
cc8b8a60
...
...
@@ -75,6 +75,18 @@ describe Ci::Pipeline, :mailer do
end
end
describe
'#schedule'
do
subject
{
pipeline
.
schedule
}
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
status: :created
)
}
it
'changes pipeline status to schedule'
do
subject
expect
(
pipeline
).
to
be_scheduled
end
end
describe
'#valid_commit_sha'
do
context
'commit.sha can not start with 00000000'
do
before
do
...
...
@@ -1288,6 +1300,19 @@ describe Ci::Pipeline, :mailer do
end
end
context
'when updating status to scheduled'
do
before
do
allow
(
pipeline
)
.
to
receive_message_chain
(
:statuses
,
:latest
,
:status
)
.
and_return
(
:scheduled
)
end
it
'updates pipeline status to scheduled'
do
expect
{
pipeline
.
update_status
}
.
to
change
{
pipeline
.
reload
.
status
}.
to
'scheduled'
end
end
context
'when statuses status was not recognized'
do
before
do
allow
(
pipeline
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录