Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
7d883994
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,发现更多精彩内容 >>
提交
7d883994
编写于
12月 08, 2016
作者:
G
Grzegorz Bizon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix tests related to detailed statuses and permissions
[ci skip]
上级
9c0a8cb5
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
45 addition
and
41 deletion
+45
-41
spec/lib/gitlab/ci/status/canceled_spec.rb
spec/lib/gitlab/ci/status/canceled_spec.rb
+3
-1
spec/lib/gitlab/ci/status/created_spec.rb
spec/lib/gitlab/ci/status/created_spec.rb
+3
-5
spec/lib/gitlab/ci/status/extended_spec.rb
spec/lib/gitlab/ci/status/extended_spec.rb
+1
-1
spec/lib/gitlab/ci/status/factory_spec.rb
spec/lib/gitlab/ci/status/factory_spec.rb
+4
-2
spec/lib/gitlab/ci/status/failed_spec.rb
spec/lib/gitlab/ci/status/failed_spec.rb
+3
-5
spec/lib/gitlab/ci/status/pending_spec.rb
spec/lib/gitlab/ci/status/pending_spec.rb
+3
-5
spec/lib/gitlab/ci/status/pipeline/common_spec.rb
spec/lib/gitlab/ci/status/pipeline/common_spec.rb
+3
-1
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
+3
-1
spec/lib/gitlab/ci/status/pipeline/success_with_warnings_spec.rb
...b/gitlab/ci/status/pipeline/success_with_warnings_spec.rb
+1
-1
spec/lib/gitlab/ci/status/running_spec.rb
spec/lib/gitlab/ci/status/running_spec.rb
+3
-5
spec/lib/gitlab/ci/status/skipped_spec.rb
spec/lib/gitlab/ci/status/skipped_spec.rb
+3
-5
spec/lib/gitlab/ci/status/stage/common_spec.rb
spec/lib/gitlab/ci/status/stage/common_spec.rb
+6
-2
spec/lib/gitlab/ci/status/stage/factory_spec.rb
spec/lib/gitlab/ci/status/stage/factory_spec.rb
+6
-2
spec/lib/gitlab/ci/status/success_spec.rb
spec/lib/gitlab/ci/status/success_spec.rb
+3
-5
未找到文件。
spec/lib/gitlab/ci/status/canceled_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Canceled
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
do
described_class
.
new
(
double
(
'subject'
),
double
(
'user'
))
end
describe
'#text'
do
it
{
expect
(
subject
.
label
).
to
eq
'canceled'
}
...
...
spec/lib/gitlab/ci/status/created_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Created
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
do
described_class
.
new
(
double
(
'subject'
),
double
(
'user'
))
end
describe
'#text'
do
it
{
expect
(
subject
.
label
).
to
eq
'created'
}
...
...
@@ -14,8 +16,4 @@ describe Gitlab::Ci::Status::Created do
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_created'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: created'
}
end
end
spec/lib/gitlab/ci/status/extended_spec.rb
浏览文件 @
7d883994
...
...
@@ -6,7 +6,7 @@ describe Gitlab::Ci::Status::Extended do
end
it
'requires subclass to implement matcher'
do
expect
{
subject
.
matches?
(
double
)
}
expect
{
subject
.
matches?
(
double
,
double
)
}
.
to
raise_error
(
NotImplementedError
)
end
end
spec/lib/gitlab/ci/status/factory_spec.rb
浏览文件 @
7d883994
...
...
@@ -2,15 +2,17 @@ require 'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Factory
do
subject
do
described_class
.
new
(
object
)
described_class
.
new
(
resource
,
user
)
end
let
(
:user
)
{
create
(
:user
)
}
let
(
:status
)
{
subject
.
fabricate!
}
context
'when object has a core status'
do
HasStatus
::
AVAILABLE_STATUSES
.
each
do
|
core_status
|
context
"when core status is
#{
core_status
}
"
do
let
(
:
object
)
{
double
(
status:
core_status
)
}
let
(
:
resource
)
{
double
(
status:
core_status
)
}
it
"fabricates a core status
#{
core_status
}
"
do
expect
(
status
).
to
be_a
(
...
...
spec/lib/gitlab/ci/status/failed_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Failed
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
do
described_class
.
new
(
double
(
'subject'
),
double
(
'user'
))
end
describe
'#text'
do
it
{
expect
(
subject
.
label
).
to
eq
'failed'
}
...
...
@@ -14,8 +16,4 @@ describe Gitlab::Ci::Status::Failed do
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_failed'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: failed'
}
end
end
spec/lib/gitlab/ci/status/pending_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Pending
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
do
described_class
.
new
(
double
(
'subject'
),
double
(
'user'
))
end
describe
'#text'
do
it
{
expect
(
subject
.
label
).
to
eq
'pending'
}
...
...
@@ -14,8 +16,4 @@ describe Gitlab::Ci::Status::Pending do
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_pending'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: pending'
}
end
end
spec/lib/gitlab/ci/status/pipeline/common_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
Common
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
subject
do
Class
.
new
(
Gitlab
::
Ci
::
Status
::
Core
)
.
new
(
pipeline
).
extend
(
described_class
)
.
new
(
pipeline
,
user
)
.
extend
(
described_class
)
end
it
'does not have action'
do
...
...
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
Factory
do
let
(
:user
)
{
create
(
:user
)
}
subject
do
described_class
.
new
(
pipeline
)
described_class
.
new
(
pipeline
,
user
)
end
let
(
:status
)
do
...
...
spec/lib/gitlab/ci/status/pipeline/success_with_warnings_spec.rb
浏览文件 @
7d883994
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
SuccessWithWarnings
do
subject
do
described_class
.
new
(
double
(
'status'
))
described_class
.
new
(
double
(
'status'
)
,
double
(
'user'
)
)
end
describe
'#test'
do
...
...
spec/lib/gitlab/ci/status/running_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Running
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
do
described_class
.
new
(
double
(
'subject'
),
double
(
'user'
))
end
describe
'#text'
do
it
{
expect
(
subject
.
label
).
to
eq
'running'
}
...
...
@@ -14,8 +16,4 @@ describe Gitlab::Ci::Status::Running do
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_running'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: running'
}
end
end
spec/lib/gitlab/ci/status/skipped_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Skipped
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
do
described_class
.
new
(
double
(
'subject'
),
double
(
'user'
))
end
describe
'#text'
do
it
{
expect
(
subject
.
label
).
to
eq
'skipped'
}
...
...
@@ -14,8 +16,4 @@ describe Gitlab::Ci::Status::Skipped do
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_skipped'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: skipped'
}
end
end
spec/lib/gitlab/ci/status/stage/common_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Stage
::
Common
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
)
}
let
(
:stage
)
{
build
(
:ci_stage
,
pipeline:
pipeline
,
name:
'test'
)
}
let
(
:stage
)
do
build
(
:ci_stage
,
pipeline:
pipeline
,
name:
'test'
)
end
subject
do
Class
.
new
(
Gitlab
::
Ci
::
Status
::
Core
)
.
new
(
stage
).
extend
(
described_class
)
.
new
(
stage
,
user
).
extend
(
described_class
)
end
it
'does not have action'
do
...
...
spec/lib/gitlab/ci/status/stage/factory_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Stage
::
Factory
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
)
}
let
(
:stage
)
{
build
(
:ci_stage
,
pipeline:
pipeline
,
name:
'test'
)
}
let
(
:stage
)
do
build
(
:ci_stage
,
pipeline:
pipeline
,
name:
'test'
)
end
subject
do
described_class
.
new
(
stage
)
described_class
.
new
(
stage
,
user
)
end
let
(
:status
)
do
...
...
spec/lib/gitlab/ci/status/success_spec.rb
浏览文件 @
7d883994
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Success
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
do
described_class
.
new
(
double
(
'subject'
),
double
(
'user'
))
end
describe
'#text'
do
it
{
expect
(
subject
.
label
).
to
eq
'passed'
}
...
...
@@ -14,8 +16,4 @@ describe Gitlab::Ci::Status::Success do
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_success'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: passed'
}
end
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录