Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
c98a641f
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,体验更适合开发者的 AI 搜索 >>
提交
c98a641f
编写于
7月 16, 2017
作者:
Y
yuuji.yaginuma
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add helper method for explicit lazy load
上级
a18cf23a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
13 deletion
+18
-13
railties/test/application/configuration_test.rb
railties/test/application/configuration_test.rb
+18
-13
未找到文件。
railties/test/application/configuration_test.rb
浏览文件 @
c98a641f
...
...
@@ -1130,7 +1130,7 @@ def create
app
"development"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
:raise
,
ActionController
::
Parameters
.
action_on_unpermitted_parameters
...
...
@@ -1141,7 +1141,7 @@ def create
test
"config.action_controller.always_permitted_parameters are: controller, action by default"
do
app
"development"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
%w(controller action)
,
ActionController
::
Parameters
.
always_permitted_parameters
end
...
...
@@ -1153,7 +1153,7 @@ def create
app
"development"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
%w( controller action format )
,
ActionController
::
Parameters
.
always_permitted_parameters
end
...
...
@@ -1177,7 +1177,7 @@ def create
app
"development"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
:raise
,
ActionController
::
Parameters
.
action_on_unpermitted_parameters
...
...
@@ -1188,7 +1188,7 @@ def create
test
"config.action_controller.action_on_unpermitted_parameters is :log by default on development"
do
app
"development"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
:log
,
ActionController
::
Parameters
.
action_on_unpermitted_parameters
end
...
...
@@ -1196,7 +1196,7 @@ def create
test
"config.action_controller.action_on_unpermitted_parameters is :log by default on test"
do
app
"test"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
:log
,
ActionController
::
Parameters
.
action_on_unpermitted_parameters
end
...
...
@@ -1204,7 +1204,7 @@ def create
test
"config.action_controller.action_on_unpermitted_parameters is false by default on production"
do
app
"production"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
false
,
ActionController
::
Parameters
.
action_on_unpermitted_parameters
end
...
...
@@ -1223,7 +1223,7 @@ def create
app
"development"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
true
,
ActionController
::
Parameters
.
permit_all_parameters
end
...
...
@@ -1234,7 +1234,7 @@ def create
app
"development"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
[],
ActionController
::
Parameters
.
always_permitted_parameters
end
...
...
@@ -1245,7 +1245,7 @@ def create
app
"development"
ActionController
::
Base
.
object_id
# force lazy load hooks to run
lazy_load
{
ActionController
::
Base
}
assert_equal
:raise
,
ActionController
::
Parameters
.
action_on_unpermitted_parameters
end
...
...
@@ -1596,7 +1596,7 @@ class Post < ActiveRecord::Base
RUBY
app
"development"
Post
.
object_id
# force lazy load hooks to run
lazy_load
{
Post
}
assert_not
ActiveRecord
::
ConnectionAdapters
::
SQLite3Adapter
.
represent_boolean_as_integer
end
...
...
@@ -1608,7 +1608,7 @@ class Post < ActiveRecord::Base
RUBY
app
"development"
Post
.
object_id
# force lazy load hooks to run
lazy_load
{
Post
}
assert
ActiveRecord
::
ConnectionAdapters
::
SQLite3Adapter
.
represent_boolean_as_integer
end
...
...
@@ -1626,7 +1626,7 @@ class Post < ActiveRecord::Base
RUBY
app
"development"
Post
.
object_id
# force lazy load hooks to run
lazy_load
{
Post
}
assert
ActiveRecord
::
ConnectionAdapters
::
SQLite3Adapter
.
represent_boolean_as_integer
end
...
...
@@ -1737,5 +1737,10 @@ def index
assert_equal
301
,
last_response
.
status
assert_equal
"https://example.org/"
,
last_response
.
location
end
private
def
lazy_load
yield
# Tasty clarifying sugar, homie! We only need to reference a constant to load it.
end
end
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录