aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-09-03 12:58:43 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-09-03 12:58:43 -0700
commit487ee41d2fe9216cd7dd194d747b5d3252180ba9 (patch)
tree336ea16d08947b208ef6e85a74767e0f5f0d4901
parent119793a4c10d6badfc168944d4909769eb142cd0 (diff)
downloadrails-487ee41d2fe9216cd7dd194d747b5d3252180ba9.tar.gz
rails-487ee41d2fe9216cd7dd194d747b5d3252180ba9.tar.bz2
rails-487ee41d2fe9216cd7dd194d747b5d3252180ba9.zip
Test for previous commit (we wrote it first, I swear)
-rw-r--r--actionpack/test/new_base/content_negotiation_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/test/new_base/content_negotiation_test.rb b/actionpack/test/new_base/content_negotiation_test.rb
new file mode 100644
index 0000000000..d2f732738d
--- /dev/null
+++ b/actionpack/test/new_base/content_negotiation_test.rb
@@ -0,0 +1,18 @@
+require File.join(File.expand_path(File.dirname(__FILE__)), "test_helper")
+
+module ContentNegotiation
+
+ # This has no layout and it works
+ class BasicController < ActionController::Base
+ self.view_paths = [ActionView::FixtureResolver.new(
+ "content_negotiation/basic/hello.html.erb" => "Hello world <%= request.formats %>!"
+ )]
+ end
+
+ class TestContentNegotiation < SimpleRouteCase
+ test "A */* Accept header will return HTML" do
+ get "/content_negotiation/basic/hello", {}, "HTTP_ACCEPT" => "*/*"
+ assert_body "Hello world */*!"
+ end
+ end
+end \ No newline at end of file