Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add test case for #5307

  • Loading branch information...
commit b35fd40891a907543d67e6aac2c53dbc22bb0b43 1 parent e7560bc
@carlosantoniodasilva carlosantoniodasilva authored josevalim committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 actionpack/test/controller/mime_responds_test.rb
View
8 actionpack/test/controller/mime_responds_test.rb
@@ -132,7 +132,6 @@ def all_types_with_layout
end
end
-
def iphone_with_html_response_type
request.format = :iphone if request.env["HTTP_ACCEPT"] == "text/iphone"
@@ -1104,7 +1103,7 @@ class PostController < AbstractPostController
around_filter :with_iphone
def index
- respond_to(:html, :iphone)
+ respond_to(:html, :iphone, :js)
end
protected
@@ -1151,6 +1150,11 @@ def test_format_with_inherited_layouts
get :index
assert_equal '<html><div id="super_iphone">Super iPhone</div></html>', @response.body
end
+
+ def test_non_navigational_format_with_no_template_fallbacks_to_html_template_with_no_layout
+ get :index, :format => :js
+ assert_equal "Hello Firefox", @response.body
+ end
end
class FlashResponder < ActionController::Responder
Please sign in to comment.
Something went wrong with that request. Please try again.