aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/new_base
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/new_base')
-rw-r--r--actionpack/test/new_base/content_type_test.rb4
-rw-r--r--actionpack/test/new_base/render_layout_test.rb2
-rw-r--r--actionpack/test/new_base/render_rjs_test.rb7
-rw-r--r--actionpack/test/new_base/render_template_test.rb2
4 files changed, 7 insertions, 8 deletions
diff --git a/actionpack/test/new_base/content_type_test.rb b/actionpack/test/new_base/content_type_test.rb
index cfc03a3024..ceee508224 100644
--- a/actionpack/test/new_base/content_type_test.rb
+++ b/actionpack/test/new_base/content_type_test.rb
@@ -75,7 +75,7 @@ module ContentType
end
test "sets Content-Type as application/xml when rendering *.xml.erb" do
- get "/content_type/implied/i_am_xml_erb"
+ get "/content_type/implied/i_am_xml_erb", "format" => "xml"
assert_header "Content-Type", "application/xml; charset=utf-8"
end
@@ -87,7 +87,7 @@ module ContentType
end
test "sets Content-Type as application/xml when rendering *.xml.builder" do
- get "/content_type/implied/i_am_xml_builder"
+ get "/content_type/implied/i_am_xml_builder", "format" => "xml"
assert_header "Content-Type", "application/xml; charset=utf-8"
end
diff --git a/actionpack/test/new_base/render_layout_test.rb b/actionpack/test/new_base/render_layout_test.rb
index 279b807a5f..933eef58e7 100644
--- a/actionpack/test/new_base/render_layout_test.rb
+++ b/actionpack/test/new_base/render_layout_test.rb
@@ -83,7 +83,7 @@ module ControllerLayouts
testing ControllerLayouts::MismatchFormatController
test "if JS is selected, an HTML template is not also selected" do
- get :index
+ get :index, "format" => "js"
assert_response "$(\"test\").omg();"
end
diff --git a/actionpack/test/new_base/render_rjs_test.rb b/actionpack/test/new_base/render_rjs_test.rb
index bd4c87b3bf..3d3e516905 100644
--- a/actionpack/test/new_base/render_rjs_test.rb
+++ b/actionpack/test/new_base/render_rjs_test.rb
@@ -21,24 +21,23 @@ module RenderRjs
def index_locale
old_locale, I18n.locale = I18n.locale, :da
end
-
end
class TestBasic < SimpleRouteCase
testing BasicController
test "rendering a partial in an RJS template should pick the JS template over the HTML one" do
- get :index
+ get :index, "format" => "js"
assert_response("$(\"customer\").update(\"JS Partial\");")
end
test "replacing an element with a partial in an RJS template should pick the HTML template over the JS one" do
- get :index_html
+ get :index_html, "format" => "js"
assert_response("$(\"customer\").update(\"HTML Partial\");")
end
test "replacing an element with a partial in an RJS template with a locale should pick the localed HTML template" do
- get :index_locale, :format => :js
+ get :index_locale, "format" => "js"
assert_response("$(\"customer\").update(\"Danish HTML Partial\");")
end
diff --git a/actionpack/test/new_base/render_template_test.rb b/actionpack/test/new_base/render_template_test.rb
index 94ea38fc7b..967cbd07b0 100644
--- a/actionpack/test/new_base/render_template_test.rb
+++ b/actionpack/test/new_base/render_template_test.rb
@@ -73,7 +73,7 @@ module RenderTemplate
end
test "rendering a builder template" do
- get :builder_template
+ get :builder_template, "format" => "xml"
assert_response "<html>\n <p>Hello</p>\n</html>\n"
end
end