diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-21 00:40:58 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-21 00:40:58 +0000 |
commit | 2afc01b7ce6283a3c5e62b92890be8cd77f9455f (patch) | |
tree | a0a7785a263d46a3a964fbf715b00396559dcb5d /actionpack/lib/action_controller/assertions | |
parent | 21187c0fb4fc559927a2f947f909dedd85969ffb (diff) | |
download | rails-2afc01b7ce6283a3c5e62b92890be8cd77f9455f.tar.gz rails-2afc01b7ce6283a3c5e62b92890be8cd77f9455f.tar.bz2 rails-2afc01b7ce6283a3c5e62b92890be8cd77f9455f.zip |
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
Diffstat (limited to 'actionpack/lib/action_controller/assertions')
-rw-r--r-- | actionpack/lib/action_controller/assertions/selector_assertions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/assertions/selector_assertions.rb b/actionpack/lib/action_controller/assertions/selector_assertions.rb index a5e022662c..8de23c1f27 100644 --- a/actionpack/lib/action_controller/assertions/selector_assertions.rb +++ b/actionpack/lib/action_controller/assertions/selector_assertions.rb @@ -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) |