# How to test response from RJS

**URL:** <https://www.ruby-forum.com/t/how-to-test-response-from-rjs/192594>\
**Category:** Rails\
**Created:** [August 2, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/how-to-test-response-from-rjs/192594 "2010-08-02T19:08:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arigo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@arigo](https://www.ruby-forum.com/u/arigo)\
**Post date:** [August 2, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/how-to-test-response-from-rjs/192594/1 "2010-08-02T19:08:44Z")

</div>

From a controller rendering and RJS template I get (by printing  
@response.body):

window.location.href = “/management/53/questions?  
participant\_id=41&question\_status=MODERATOR\_INBOX”;

I ma trying to test that response with:

assert\_select ‘window.location.href’, “management”

I does not work. Do you know how I can test if there is that redirect  
in an RJS response?
