diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/testing')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 8777666f9f..4f21403a90 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -336,8 +336,10 @@ module ActionDispatch end path = request_encoder.append_format_to location.path path = location.query ? "#{path}?#{location.query}" : path - else - path = request_encoder.append_format_to path + elsif !as.nil? + location = URI.parse(path) + path = request_encoder.append_format_to location.path + path = location.query ? "#{path}?#{location.query}" : path end hostname, port = host.split(':') |