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:
parent
21187c0fb4
commit
2afc01b7ce
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue