vendor/rails/actionpack/test/controller/test_test.rb in radiant-0.6.3 vs vendor/rails/actionpack/test/controller/test_test.rb in radiant-0.6.4
- old
+ new
@@ -480,9 +480,25 @@
assert_raise(Test::Unit::AssertionFailedError) do
assert_redirected_to 'created resource'
end
end
+ def test_request_uri_updates
+ get :test_params
+ uri = @request.request_uri
+ assert_equal @request.env['REQUEST_URI'], uri
+
+ get :test_uri
+ assert_not_equal uri, @request.request_uri
+ uri = @request.request_uri
+ assert_equal @request.env['REQUEST_URI'], uri
+
+ get :test_uri, :testing => true
+ assert_not_equal uri, @request.request_uri
+ uri = @request.request_uri
+ assert_equal @request.env['REQUEST_URI'], uri
+ end
+
protected
def with_foo_routing
with_routing do |set|
set.draw do |map|
map.generate_url 'foo', :controller => 'test'