Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
6224ac06
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 搜索 >>
提交
6224ac06
编写于
3月 06, 2013
作者:
S
Sato Hiroyuki
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add and fix some tests for routing.
It is linked to #2598.
上级
6beae84e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
6 deletion
+16
-6
spec/controllers/commits_controller_spec.rb
spec/controllers/commits_controller_spec.rb
+1
-1
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+15
-5
未找到文件。
spec/controllers/commits_controller_spec.rb
浏览文件 @
6224ac06
...
...
@@ -13,7 +13,7 @@ describe CommitsController do
describe
"GET show"
do
context
"as atom feed"
do
it
"should render as atom"
do
get
:show
,
project_id:
project
.
path
,
id:
"master
.
atom"
get
:show
,
project_id:
project
.
path
,
id:
"master
"
,
format:
"
atom"
response
.
should
be_success
response
.
content_type
.
should
==
'application/atom+xml'
end
...
...
spec/routing/project_routing_spec.rb
浏览文件 @
6224ac06
...
...
@@ -56,7 +56,6 @@ end
# projects POST /projects(.:format) projects#create
# new_project GET /projects/new(.:format) projects#new
# wall_project GET /:id/wall(.:format) projects#wall
# graph_project GET /:id/graph(.:format) projects#graph
# files_project GET /:id/files(.:format) projects#files
# edit_project GET /:id/edit(.:format) projects#edit
# project GET /:id(.:format) projects#show
...
...
@@ -75,10 +74,6 @@ describe ProjectsController, "routing" do
get
(
"/gitlabhq/wall"
).
should
route_to
(
'projects#wall'
,
id:
'gitlabhq'
)
end
it
"to #graph"
do
get
(
"/gitlabhq/graph/master"
).
should
route_to
(
'graph#show'
,
project_id:
'gitlabhq'
,
id:
'master'
)
end
it
"to #files"
do
get
(
"/gitlabhq/files"
).
should
route_to
(
'projects#files'
,
id:
'gitlabhq'
)
end
...
...
@@ -202,6 +197,7 @@ describe RefsController, "routing" do
it
"to #logs_tree"
do
get
(
"/gitlabhq/refs/stable/logs_tree"
).
should
route_to
(
'refs#logs_tree'
,
project_id:
'gitlabhq'
,
id:
'stable'
)
get
(
"/gitlabhq/refs/stable/logs_tree/foo/bar/baz"
).
should
route_to
(
'refs#logs_tree'
,
project_id:
'gitlabhq'
,
id:
'stable'
,
path:
'foo/bar/baz'
)
get
(
"/gitlab/gitlabhq/refs/stable/logs_tree/files.scss"
).
should
route_to
(
'refs#logs_tree'
,
project_id:
'gitlab/gitlabhq'
,
id:
'stable'
,
path:
'files.scss'
)
end
end
...
...
@@ -301,6 +297,10 @@ describe CommitsController, "routing" do
let
(
:actions
)
{
[
:show
]
}
let
(
:controller
)
{
'commits'
}
end
it
"to #show"
do
get
(
"/gitlab/gitlabhq/commits/master.atom"
).
should
route_to
(
'commits#show'
,
project_id:
'gitlab/gitlabhq'
,
id:
"master"
,
format:
"atom"
)
end
end
# project_team_members GET /:project_id/team_members(.:format) team_members#index
...
...
@@ -385,6 +385,7 @@ end
describe
BlameController
,
"routing"
do
it
"to #show"
do
get
(
"/gitlabhq/blame/master/app/models/project.rb"
).
should
route_to
(
'blame#show'
,
project_id:
'gitlabhq'
,
id:
'master/app/models/project.rb'
)
get
(
"/gitlab/gitlabhq/blame/master/files.scss"
).
should
route_to
(
'blame#show'
,
project_id:
'gitlab/gitlabhq'
,
id:
'master/files.scss'
)
end
end
...
...
@@ -393,6 +394,7 @@ describe BlobController, "routing" do
it
"to #show"
do
get
(
"/gitlabhq/blob/master/app/models/project.rb"
).
should
route_to
(
'blob#show'
,
project_id:
'gitlabhq'
,
id:
'master/app/models/project.rb'
)
get
(
"/gitlabhq/blob/master/app/models/compare.rb"
).
should
route_to
(
'blob#show'
,
project_id:
'gitlabhq'
,
id:
'master/app/models/compare.rb'
)
get
(
"/gitlab/gitlabhq/blob/master/files.scss"
).
should
route_to
(
'blob#show'
,
project_id:
'gitlab/gitlabhq'
,
id:
'master/files.scss'
)
end
end
...
...
@@ -400,6 +402,7 @@ end
describe
TreeController
,
"routing"
do
it
"to #show"
do
get
(
"/gitlabhq/tree/master/app/models/project.rb"
).
should
route_to
(
'tree#show'
,
project_id:
'gitlabhq'
,
id:
'master/app/models/project.rb'
)
get
(
"/gitlab/gitlabhq/tree/master/files.scss"
).
should
route_to
(
'tree#show'
,
project_id:
'gitlab/gitlabhq'
,
id:
'master/files.scss'
)
end
end
...
...
@@ -420,3 +423,10 @@ describe CompareController, "routing" do
get
(
"/gitlabhq/compare/issue/1234...stable"
).
should
route_to
(
'compare#show'
,
project_id:
'gitlabhq'
,
from:
'issue/1234'
,
to:
'stable'
)
end
end
describe
GraphController
,
"routing"
do
it
"to #show"
do
get
(
"/gitlabhq/graph/master"
).
should
route_to
(
'graph#show'
,
project_id:
'gitlabhq'
,
id:
'master'
)
get
(
"/gitlabhq/graph/master.json"
).
should
route_to
(
'graph#show'
,
project_id:
'gitlabhq'
,
id:
'master'
,
format:
"json"
)
end
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录