Skip to content

Commit

Permalink
Ensure proper format for IE. Closes #104
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed May 4, 2015
1 parent 5134f55 commit 31e929b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/action/format_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ def call(params)
status.must_equal 200
end

# Bug
# See https://github.com/lotus/controller/issues/104
it "accepts 'text/html, application/xhtml+xml, image/jxr, */*' and returns :html" do
status, headers, _ = @action.call({ 'HTTP_ACCEPT' => 'text/html, application/xhtml+xml, image/jxr, */*' })

@action.format.must_equal :html
headers['Content-Type'].must_equal 'text/html; charset=utf-8'
status.must_equal 200
end

mime_types = ['application/octet-stream', 'text/html']
Rack::Mime::MIME_TYPES.each do |format, mime_type|
next if mime_types.include?(mime_type)
Expand Down

0 comments on commit 31e929b

Please sign in to comment.