Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
12d44272
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,体验更适合开发者的 AI 搜索 >>
提交
12d44272
编写于
5月 30, 2016
作者:
G
Grzegorz Bizon
提交者:
James Edwards-Jones
2月 01, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix Rubocop offenses
上级
66bfc9e9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
15 deletion
+15
-15
spec/models/pages_domain_spec.rb
spec/models/pages_domain_spec.rb
+7
-7
spec/services/pages_service_spec.rb
spec/services/pages_service_spec.rb
+2
-2
spec/services/projects/update_pages_service_spec.rb
spec/services/projects/update_pages_service_spec.rb
+6
-6
未找到文件。
spec/models/pages_domain_spec.rb
浏览文件 @
12d44272
...
...
@@ -23,13 +23,13 @@ describe PagesDomain, models: true do
context
'no domain'
do
let
(
:domain
)
{
nil
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
context
'invalid domain'
do
let
(
:domain
)
{
'0123123'
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
context
'domain from .example.com'
do
...
...
@@ -37,7 +37,7 @@ describe PagesDomain, models: true do
before
{
allow
(
Settings
.
pages
).
to
receive
(
:host
).
and_return
(
'domain.com'
)
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
end
...
...
@@ -47,13 +47,13 @@ describe PagesDomain, models: true do
context
'when only certificate is specified'
do
let
(
:domain
)
{
build
(
:pages_domain
,
:with_certificate
)
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
context
'when only key is specified'
do
let
(
:domain
)
{
build
(
:pages_domain
,
:with_key
)
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
context
'with matching key'
do
...
...
@@ -65,7 +65,7 @@ describe PagesDomain, models: true do
context
'for not matching key'
do
let
(
:domain
)
{
build
(
:pages_domain
,
:with_missing_chain
,
:with_key
)
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
end
...
...
@@ -157,6 +157,6 @@ describe PagesDomain, models: true do
subject
{
domain
.
certificate_text
}
# We test only existence of output, since the output is long
it
{
is_expected
.
to_not
be_empty
}
it
{
is_expected
.
not_to
be_empty
}
end
end
spec/services/pages_service_spec.rb
浏览文件 @
12d44272
...
...
@@ -26,7 +26,7 @@ describe PagesService, services: true do
before
{
build
.
status
=
status
}
it
'should not execute worker'
do
expect
(
PagesWorker
).
to_not
receive
(
:perform_async
)
expect
(
PagesWorker
).
not_to
receive
(
:perform_async
)
service
.
execute
end
end
...
...
@@ -40,7 +40,7 @@ describe PagesService, services: true do
end
it
'should not execute worker'
do
expect
(
PagesWorker
).
to_not
receive
(
:perform_async
)
expect
(
PagesWorker
).
not_to
receive
(
:perform_async
)
service
.
execute
end
end
...
...
spec/services/projects/update_pages_service_spec.rb
浏览文件 @
12d44272
...
...
@@ -34,7 +34,7 @@ describe Projects::UpdatePagesService do
it
'limits pages size'
do
stub_application_setting
(
max_pages_size:
1
)
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
it
'removes pages after destroy'
do
...
...
@@ -49,29 +49,29 @@ describe Projects::UpdatePagesService do
it
'fails if sha on branch is not latest'
do
pipeline
.
update_attributes
(
sha:
'old_sha'
)
build
.
update_attributes
(
artifacts_file:
file
)
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
it
'fails for empty file fails'
do
build
.
update_attributes
(
artifacts_file:
empty_file
)
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
end
end
it
'fails to remove project pages when no pages is deployed'
do
expect
(
PagesWorker
).
to_not
receive
(
:perform_in
)
expect
(
PagesWorker
).
not_to
receive
(
:perform_in
)
expect
(
project
.
pages_deployed?
).
to
be_falsey
project
.
destroy
end
it
'fails if no artifacts'
do
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
it
'fails for invalid archive'
do
build
.
update_attributes
(
artifacts_file:
invalid_file
)
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
def
execute
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录