Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
90075814
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,发现更多精彩内容 >>
提交
90075814
编写于
1月 03, 2015
作者:
R
Rafael Mendonça França
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove some warnings
上级
c2094f55
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
32 deletion
+32
-32
railties/test/application/configuration_test.rb
railties/test/application/configuration_test.rb
+32
-32
未找到文件。
railties/test/application/configuration_test.rb
浏览文件 @
90075814
...
...
@@ -337,9 +337,9 @@ def assert_utf8
end
test
"Use key_generator when secret_key_base is set"
do
make_basic_app
do
|
app
|
app
.
secrets
.
secret_key_base
=
'b3c631c314c0bbca50c1b2843150fe33'
app
.
config
.
session_store
:disabled
make_basic_app
do
|
app
lication
|
app
lication
.
secrets
.
secret_key_base
=
'b3c631c314c0bbca50c1b2843150fe33'
app
lication
.
config
.
session_store
:disabled
end
class
::
OmgController
<
ActionController
::
Base
...
...
@@ -357,9 +357,9 @@ def index
end
test
"application verifier can be used in the entire application"
do
make_basic_app
do
|
app
|
app
.
secrets
.
secret_key_base
=
'b3c631c314c0bbca50c1b2843150fe33'
app
.
config
.
session_store
:disabled
make_basic_app
do
|
app
lication
|
app
lication
.
secrets
.
secret_key_base
=
'b3c631c314c0bbca50c1b2843150fe33'
app
lication
.
config
.
session_store
:disabled
end
message
=
app
.
message_verifier
(
:sensitive_value
).
generate
(
"some_value"
)
...
...
@@ -417,9 +417,9 @@ def index
end
test
"application verifier can build different verifiers"
do
make_basic_app
do
|
app
|
app
.
secrets
.
secret_key_base
=
'b3c631c314c0bbca50c1b2843150fe33'
app
.
config
.
session_store
:disabled
make_basic_app
do
|
app
lication
|
app
lication
.
secrets
.
secret_key_base
=
'b3c631c314c0bbca50c1b2843150fe33'
app
lication
.
config
.
session_store
:disabled
end
default_verifier
=
app
.
message_verifier
(
:sensitive_value
)
...
...
@@ -643,8 +643,8 @@ def form_authenticity_token; token; end # stub the authenticy token
end
test
"request forgery token param can be changed"
do
make_basic_app
do
app
.
config
.
action_controller
.
request_forgery_protection_token
=
'_xsrf_token_here'
make_basic_app
do
|
application
|
app
lication
.
config
.
action_controller
.
request_forgery_protection_token
=
'_xsrf_token_here'
end
class
::
OmgController
<
ActionController
::
Base
...
...
@@ -663,8 +663,8 @@ def index
end
test
"sets ActionDispatch::Response.default_charset"
do
make_basic_app
do
|
app
|
app
.
config
.
action_dispatch
.
default_charset
=
"utf-16"
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
action_dispatch
.
default_charset
=
"utf-16"
end
assert_equal
"utf-16"
,
ActionDispatch
::
Response
.
default_charset
...
...
@@ -845,8 +845,8 @@ def index
end
test
"config.action_dispatch.show_exceptions is sent in env"
do
make_basic_app
do
|
app
|
app
.
config
.
action_dispatch
.
show_exceptions
=
true
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
action_dispatch
.
show_exceptions
=
true
end
class
::
OmgController
<
ActionController
::
Base
...
...
@@ -1007,8 +1007,8 @@ def create
end
test
"config.action_dispatch.ignore_accept_header"
do
make_basic_app
do
|
app
|
app
.
config
.
action_dispatch
.
ignore_accept_header
=
true
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
action_dispatch
.
ignore_accept_header
=
true
end
class
::
OmgController
<
ActionController
::
Base
...
...
@@ -1045,9 +1045,9 @@ def index
test
"config.session_store with :active_record_store with activerecord-session_store gem"
do
begin
make_basic_app
do
|
app
|
make_basic_app
do
|
app
lication
|
ActionDispatch
::
Session
::
ActiveRecordStore
=
Class
.
new
(
ActionDispatch
::
Session
::
CookieStore
)
app
.
config
.
session_store
:active_record_store
app
lication
.
config
.
session_store
:active_record_store
end
ensure
ActionDispatch
::
Session
.
send
:remove_const
,
:ActiveRecordStore
...
...
@@ -1056,8 +1056,8 @@ def index
test
"config.session_store with :active_record_store without activerecord-session_store gem"
do
assert_raise
RuntimeError
,
/activerecord-session_store/
do
make_basic_app
do
|
app
|
app
.
config
.
session_store
:active_record_store
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
session_store
:active_record_store
end
end
end
...
...
@@ -1065,8 +1065,8 @@ def index
test
"Blank config.log_level is not deprecated for non-production environment"
do
with_rails_env
"development"
do
assert_not_deprecated
do
make_basic_app
do
|
app
|
app
.
config
.
log_level
=
nil
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
log_level
=
nil
end
end
end
...
...
@@ -1075,8 +1075,8 @@ def index
test
"Blank config.log_level is deprecated for the production environment"
do
with_rails_env
"production"
do
assert_deprecated
(
/log_level/
)
do
make_basic_app
do
|
app
|
app
.
config
.
log_level
=
nil
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
log_level
=
nil
end
end
end
...
...
@@ -1085,17 +1085,17 @@ def index
test
"Not blank config.log_level is not deprecated for the production environment"
do
with_rails_env
"production"
do
assert_not_deprecated
do
make_basic_app
do
|
app
|
app
.
config
.
log_level
=
:info
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
log_level
=
:info
end
end
end
end
test
"config.log_level with custom logger"
do
make_basic_app
do
|
app
|
app
.
config
.
logger
=
Logger
.
new
(
STDOUT
)
app
.
config
.
log_level
=
:info
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
logger
=
Logger
.
new
(
STDOUT
)
app
lication
.
config
.
log_level
=
:info
end
assert_equal
Logger
::
INFO
,
Rails
.
logger
.
level
end
...
...
@@ -1125,8 +1125,8 @@ def index
end
test
"config.annotations wrapping SourceAnnotationExtractor::Annotation class"
do
make_basic_app
do
|
app
|
app
.
config
.
annotations
.
register_extensions
(
"coffee"
)
do
|
tag
|
make_basic_app
do
|
app
lication
|
app
lication
.
config
.
annotations
.
register_extensions
(
"coffee"
)
do
|
tag
|
/#\s*(
#{
tag
}
):?\s*(.*)$/
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录