diff options
author | John Hawthorn <john@hawthorn.email> | 2019-03-19 11:56:53 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2019-03-21 13:44:56 -0700 |
commit | f35631d46610ac62d57743bdb5f71a0039b1cf78 (patch) | |
tree | 5a8f9e7171d21faad292613b23e86bb58cf21223 /actionview/test/fixtures/test | |
parent | 382a9563a3bc3dd1982f4db1258e8f0e7f5fac8e (diff) | |
download | rails-f35631d46610ac62d57743bdb5f71a0039b1cf78.tar.gz rails-f35631d46610ac62d57743bdb5f71a0039b1cf78.tar.bz2 rails-f35631d46610ac62d57743bdb5f71a0039b1cf78.zip |
Prefer render template: in tests
Many tests were using `render file:`, but were only testing the
behaviour of `render template:` (file: just allows more paths/ is less
secure then template:).
The reason for so many `render file:` is probably that they were the old
default.
This commit replaces `render file:` with `render template:` anywhere the
test wasn't specifically interested in using `render file:`.
Diffstat (limited to 'actionview/test/fixtures/test')
-rw-r--r-- | actionview/test/fixtures/test/hello.builder | 2 | ||||
-rw-r--r-- | actionview/test/fixtures/test/layout_render_file.erb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionview/test/fixtures/test/hello.builder b/actionview/test/fixtures/test/hello.builder index b8ab17ad5b..4c34ee85f0 100644 --- a/actionview/test/fixtures/test/hello.builder +++ b/actionview/test/fixtures/test/hello.builder @@ -1,4 +1,4 @@ xml.html do xml.p "Hello #{@name}" - xml << render(file: "test/greeting") + xml << render(template: "test/greeting") end diff --git a/actionview/test/fixtures/test/layout_render_file.erb b/actionview/test/fixtures/test/layout_render_file.erb index 2f8e921c5f..0477743dc4 100644 --- a/actionview/test/fixtures/test/layout_render_file.erb +++ b/actionview/test/fixtures/test/layout_render_file.erb @@ -1,2 +1,2 @@ <% content_for :title do %>title<% end -%> -<%= render :file => 'layouts/yield' -%>
\ No newline at end of file +<%= render template: 'layouts/yield' -%> |