diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-25 14:57:15 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-25 14:57:15 +0000 |
commit | 55a9c86e6228b4286df7fb59c326832b57aa0f54 (patch) | |
tree | 5cd73301e18bdbd5a03d50d42a3164a323dbe133 /actionpack/test | |
parent | 3b98b685163be795e3156ce75d5083689c137dd8 (diff) | |
download | rails-55a9c86e6228b4286df7fb59c326832b57aa0f54.tar.gz rails-55a9c86e6228b4286df7fb59c326832b57aa0f54.tar.bz2 rails-55a9c86e6228b4286df7fb59c326832b57aa0f54.zip |
Added failing tests for iphone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/mime_responds_test.rb | 5 | ||||
-rw-r--r-- | actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 526b7792be..959cb7c2f4 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -116,7 +116,8 @@ class RespondToController < ActionController::Base def iphone_with_html_response_type Mime::Type.register_alias("text/html", :iphone) - + request.format = "iphone" if request.env["HTTP_ACCEPT"] == "text/iphone" + respond_to do |type| type.html { @type = "Firefox" } type.iphone { @type = "iPhone" } @@ -399,7 +400,7 @@ class MimeControllerTest < Test::Unit::TestCase get :iphone_with_html_response_type, :format => "iphone" assert_equal "text/html", @response.content_type - assert_equal "<html>Hello future from iPhone!</html>", @response.body + assert_equal "<html>Hello iPhone future from iPhone!</html>", @response.body end def test_format_with_custom_response_type_and_request_headers diff --git a/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb b/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb new file mode 100644 index 0000000000..17888ac303 --- /dev/null +++ b/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb @@ -0,0 +1 @@ +Hello iPhone future from <%= @type -%>!
\ No newline at end of file |