aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorArthur Nogueira Neves <github@arthurnn.com>2015-11-26 16:10:46 -0500
committerArthur Nogueira Neves <github@arthurnn.com>2015-11-26 16:10:46 -0500
commit9afb0b9c432f6987a59b44c2fff15785b5fd5784 (patch)
tree91c94f15998f1038ad8637eab23b5dd434c5a44a /actionpack/test/dispatch
parent52141d365805f6433c9adf272aa6c19e3049147e (diff)
parente6e056c2c141ec94eb8e79a30ee766f77fdaf30d (diff)
downloadrails-9afb0b9c432f6987a59b44c2fff15785b5fd5784.tar.gz
rails-9afb0b9c432f6987a59b44c2fff15785b5fd5784.tar.bz2
rails-9afb0b9c432f6987a59b44c2fff15785b5fd5784.zip
Merge pull request #21241 from pdg137/master
In url_for, never append ? when the query string is empty anyway.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/url_generation_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/url_generation_test.rb b/actionpack/test/dispatch/url_generation_test.rb
index fd4ede4d1b..8c9782bb90 100644
--- a/actionpack/test/dispatch/url_generation_test.rb
+++ b/actionpack/test/dispatch/url_generation_test.rb
@@ -129,6 +129,13 @@ module TestUrlGeneration
)
end
+ test "generating URLS with empty querystring" do
+ assert_equal "/bars.json", bars_path(
+ a: {},
+ format: 'json'
+ )
+ end
+
end
end