# Incorrect response header with functional test?

**URL:** <https://www.ruby-forum.com/t/incorrect-response-header-with-functional-test/90093>\
**Category:** Rails\
**Created:** [March 26, 2007, 12:59am UTC](https://www.ruby-forum.com/t/incorrect-response-header-with-functional-test/90093 "2007-03-26T00:59:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jason](https://www.ruby-forum.com/u/jason)\
**Post date:** [March 26, 2007, 12:59am UTC](https://www.ruby-forum.com/t/incorrect-response-header-with-functional-test/90093/1 "2007-03-26T00:59:28Z")

</div>

I’m testing a controller by doing an ajax post to create an entry,  
then a normal get to see that entry show up on a page. After the get  
the @response.body is correct, but @response.headers still says the  
content type is “text/javascript”, so assert\_select doesn’t work. It  
seems like the second request, the get, would set the content type to  
“text/html” since it’s just a normal page. Am I off base here? Any  
help is appreciated.

Thanks,  
Jason
