mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Test for previous commit (we wrote it first, I swear)
This commit is contained in:
18
actionpack/test/new_base/content_negotiation_test.rb
Normal file
18
actionpack/test/new_base/content_negotiation_test.rb
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user