1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make assert_select access content_type through accessor instead of header

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2007-02-21 00:40:58 +00:00
parent 21187c0fb4
commit 2afc01b7ce

View file

@ -551,7 +551,7 @@ module ActionController
# #assert_select and #css_select call this to obtain the content in the HTML
# page, or from all the RJS statements, depending on the type of response.
def response_from_page_or_rjs()
content_type = @response.headers["Content-Type"]
content_type = @response.content_type
if content_type && content_type =~ /text\/javascript/
body = @response.body.dup
root = HTML::Node.new(nil)