Skip to content
Browse files

Test for previous commit (we wrote it first, I swear)

  • Loading branch information...
1 parent 119793a commit 487ee41d2fe9216cd7dd194d747b5d3252180ba9 Yehuda Katz + Carl Lerche committed
Showing with 18 additions and 0 deletions.
  1. +18 −0 actionpack/test/new_base/content_negotiation_test.rb
View
18 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

0 comments on commit 487ee41

Please sign in to comment.
Something went wrong with that request. Please try again.