# Integration test redirects to external URLs

**URL:** <https://www.ruby-forum.com/t/integration-test-redirects-to-external-urls/93238>\
**Category:** Rails\
**Created:** [April 29, 2007, 8:24pm UTC](https://www.ruby-forum.com/t/integration-test-redirects-to-external-urls/93238 "2007-04-29T20:24:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mansfiem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Post date:** [April 29, 2007, 8:24pm UTC](https://www.ruby-forum.com/t/integration-test-redirects-to-external-urls/93238/1 "2007-04-29T20:24:24Z")

</div>

In an integration test that I am writing I want to do something like

def test\_my\_page  
get “/rails/someaction”  
assert\_response :redirect  
follow\_redirect!  
assert\_url =\> ‘[http://www.somepageoutsidemyrailsapp](http://www.somepageoutsidemyrailsapp)’  
end

Is there any way to do something like ‘assert\_url’ and see if I was  
redirected to a page outside of the rails application? If the page  
was part of my rails app I could use assert\_redirected\_to but since I  
want to check against a full URL I don’t know how to proceed.

Thank you,  
Matt M.
