Permalink
Browse files

Make assert_select access content_type through accessor instead of he…

…ader

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 21187c0 commit 2afc01b7ce6283a3c5e62b92890be8cd77f9455f @dhh dhh committed Feb 21, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/assertions/selector_assertions.rb
@@ -551,7 +551,7 @@ def assert_select_email(&block)
# #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)

0 comments on commit 2afc01b

Please sign in to comment.