aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/mime_responds_test.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-07 09:31:27 -0300
committerJosé Valim <jose.valim@gmail.com>2012-03-07 15:03:19 +0100
commitb35fd40891a907543d67e6aac2c53dbc22bb0b43 (patch)
tree12c07d0537c87b0e8a117c074d4b4882c3108e62 /actionpack/test/controller/mime_responds_test.rb
parente7560bc787545e09ad10b474fb1b46365f6fc3f1 (diff)
downloadrails-b35fd40891a907543d67e6aac2c53dbc22bb0b43.tar.gz
rails-b35fd40891a907543d67e6aac2c53dbc22bb0b43.tar.bz2
rails-b35fd40891a907543d67e6aac2c53dbc22bb0b43.zip
Add test case for #5307
Diffstat (limited to 'actionpack/test/controller/mime_responds_test.rb')
-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 f00ddb1799..981488fac1 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"
@@ -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 @@ 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