aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-07 09:31:27 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-07 09:35:17 -0300
commit787617760cb63b46bc176b94d8ebbf59b5c848cc (patch)
treeae6ec4bc796d694128a6c6e2adc81360047a70ea /actionpack
parentd87ec9d3108afda28a5744d0b7edd328c3c284d1 (diff)
downloadrails-787617760cb63b46bc176b94d8ebbf59b5c848cc.tar.gz
rails-787617760cb63b46bc176b94d8ebbf59b5c848cc.tar.bz2
rails-787617760cb63b46bc176b94d8ebbf59b5c848cc.zip
Add test case for #5307
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/mime_responds_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb
index f618d4889d..0e4099ddc6 100644
--- a/actionpack/test/controller/mime_responds_test.rb
+++ b/actionpack/test/controller/mime_responds_test.rb
@@ -132,7 +132,6 @@ class RespondToController < ActionController::Base
end
end
-
def iphone_with_html_response_type
request.format = :iphone if request.env["HTTP_ACCEPT"] == "text/iphone"
@@ -1135,7 +1134,7 @@ class PostController < AbstractPostController
around_filter :with_iphone
def index
- respond_to(:html, :iphone)
+ respond_to(:html, :iphone, :js)
end
protected
@@ -1182,6 +1181,11 @@ class MimeControllerLayoutsTest < ActionController::TestCase
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