Phil,
Do you mean "request"? The response object doesn''t
encapsulate a
request_uri attribute. With the request object, you can do:
request.request_uri
In general, the request environment can be accessed via:
request.env
(That''s a Hash instance.)
Hope that helps,
Jamis
On Apr 3, 2006, at 7:33 PM, phil swenson wrote:
> I?m using the new 1.1 integration test facility? I?m trying to write a
> test that sees if a controller redirects to the correct place and
> preserves the query string.
>
> Here?s the code:
>
>
> class LoginRedirectTest < ActionController::IntegrationTest
>
>
>
> def test_non_admin_auth
>
> request_uri = "/datafeed/event/report?blah=blah"
>
> get(request_uri)
>
> follow_redirect!
>
> assert_response :success
>
> status = post("/login/authenticate", :login_info =>
{:user_name =>
> "blah", :password => "blah"})
>
> follow_redirect!
>
> assert_response :success
>
> user = session[:user]
>
> assert !user.nil?
>
> # puts response["REQUEST_URI"]
>
> # assert_equal(request_uri, response ["REQUEST_URI"])
>
> end
>
>
>
> The last two lines don?t work? I can see REQUEST_URL in the
> @attributes
> of the response and it contains the correct uri
> ("/datafeed/event/report?blah=blah"), but I can?t figure out how
to
> access it. I also haven?t been able to locate the source code for the
> response (CgiResponse). Can someone point me in the right direction?
>
>
>
> Thanks,
>
> phil
>
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails