Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
562a12df
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
562a12df
编写于
1月 15, 2012
作者:
C
Carlos Antonio da Silva
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename test class and fix tests to keep consistency
Based on
50d23bc2
.
上级
bb33e888
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
10 addition
and
10 deletion
+10
-10
actionpack/test/controller/test_case_test.rb
actionpack/test/controller/test_case_test.rb
+10
-10
未找到文件。
actionpack/test/controller/test_case_test.rb
浏览文件 @
562a12df
...
...
@@ -2,7 +2,7 @@
require
'controller/fake_controllers'
require
'active_support/ordered_hash'
class
TestTest
<
ActionController
::
TestCase
class
Test
Case
Test
<
ActionController
::
TestCase
class
TestController
<
ActionController
::
Base
def
no_op
render
:text
=>
'dummy'
...
...
@@ -171,7 +171,7 @@ def test_body_stream
def
test_document_body_and_params_with_post
post
:test_params
,
:id
=>
1
assert_equal
(
"{
\"
id
\"
=>
\"
1
\"
,
\"
controller
\"
=>
\"
test_test/test
\"
,
\"
action
\"
=>
\"
test_params
\"
}"
,
@response
.
body
)
assert_equal
(
"{
\"
id
\"
=>
\"
1
\"
,
\"
controller
\"
=>
\"
test_
case_
test/test
\"
,
\"
action
\"
=>
\"
test_params
\"
}"
,
@response
.
body
)
end
def
test_document_body_with_post
...
...
@@ -244,18 +244,18 @@ def test_response_and_request_have_nice_accessors
def
test_process_with_request_uri_with_no_params
process
:test_uri
assert_equal
"/test_test/test/test_uri"
,
@response
.
body
assert_equal
"/test_
case_
test/test/test_uri"
,
@response
.
body
end
def
test_process_with_request_uri_with_params
process
:test_uri
,
"GET"
,
:id
=>
7
assert_equal
"/test_test/test/test_uri/7"
,
@response
.
body
assert_equal
"/test_
case_
test/test/test_uri/7"
,
@response
.
body
end
def
test_process_with_old_api
assert_deprecated
do
process
:test_uri
,
:id
=>
7
assert_equal
"/test_test/test/test_uri/7"
,
@response
.
body
assert_equal
"/test_
case_
test/test/test_uri/7"
,
@response
.
body
end
end
...
...
@@ -539,7 +539,7 @@ def test_params_passing
get
:test_params
,
:page
=>
{
:name
=>
"Page name"
,
:month
=>
'4'
,
:year
=>
'2004'
,
:day
=>
'6'
}
parsed_params
=
eval
(
@response
.
body
)
assert_equal
(
{
'controller'
=>
'test_test/test'
,
'action'
=>
'test_params'
,
{
'controller'
=>
'test_
case_
test/test'
,
'action'
=>
'test_params'
,
'page'
=>
{
'name'
=>
"Page name"
,
'month'
=>
'4'
,
'year'
=>
'2004'
,
'day'
=>
'6'
}},
parsed_params
)
...
...
@@ -549,7 +549,7 @@ def test_params_passing_with_fixnums
get
:test_params
,
:page
=>
{
:name
=>
"Page name"
,
:month
=>
4
,
:year
=>
2004
,
:day
=>
6
}
parsed_params
=
eval
(
@response
.
body
)
assert_equal
(
{
'controller'
=>
'test_test/test'
,
'action'
=>
'test_params'
,
{
'controller'
=>
'test_
case_
test/test'
,
'action'
=>
'test_params'
,
'page'
=>
{
'name'
=>
"Page name"
,
'month'
=>
'4'
,
'year'
=>
'2004'
,
'day'
=>
'6'
}},
parsed_params
)
...
...
@@ -561,7 +561,7 @@ def test_params_passing_with_frozen_values
end
parsed_params
=
eval
(
@response
.
body
)
assert_equal
(
{
'controller'
=>
'test_test/test'
,
'action'
=>
'test_params'
,
{
'controller'
=>
'test_
case_
test/test'
,
'action'
=>
'test_params'
,
'frozen'
=>
'icy'
,
'frozens'
=>
[
'icy'
]},
parsed_params
)
...
...
@@ -581,7 +581,7 @@ def test_id_converted_to_string
def
test_array_path_parameter_handled_properly
with_routing
do
|
set
|
set
.
draw
do
match
'file/*path'
,
:to
=>
'test_test/test#test_params'
match
'file/*path'
,
:to
=>
'test_
case_
test/test#test_params'
match
':controller/:action'
end
...
...
@@ -716,7 +716,7 @@ def test_test_uploaded_file
end
def
test_fixture_path_is_accessed_from_self_instead_of_active_support_test_case
TestTest
.
stubs
(
:fixture_path
).
returns
(
FILES_DIR
)
Test
Case
Test
.
stubs
(
:fixture_path
).
returns
(
FILES_DIR
)
uploaded_file
=
fixture_file_upload
(
'/mona_lisa.jpg'
,
'image/png'
)
assert_equal
File
.
open
(
"
#{
FILES_DIR
}
/mona_lisa.jpg"
,
READ_PLAIN
).
read
,
uploaded_file
.
read
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录