aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template
diff options
context:
space:
mode:
authorStan Lo <a22301613@yahoo.com.tw>2016-06-25 11:29:39 +0800
committerStan Lo <a22301613@yahoo.com.tw>2016-07-20 10:57:26 +0800
commitef89331f0a397bc88d6e27480aa7562db70550f7 (patch)
treea3ef633cead7494d8e6d567e9bf5d63b867d6cb9 /actionview/test/template
parent40bf7a52d51498879d9b442663b7a23f37fb1204 (diff)
downloadrails-ef89331f0a397bc88d6e27480aa7562db70550f7.tar.gz
rails-ef89331f0a397bc88d6e27480aa7562db70550f7.tar.bz2
rails-ef89331f0a397bc88d6e27480aa7562db70550f7.zip
Fix ActionView::Helpers#current_page? with issue in https://github.com/rails/rails/issues/19472
Diffstat (limited to 'actionview/test/template')
-rw-r--r--actionview/test/template/url_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionview/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb
index ab56d80de3..6060ea2f1e 100644
--- a/actionview/test/template/url_helper_test.rb
+++ b/actionview/test/template/url_helper_test.rb
@@ -503,6 +503,12 @@ class UrlHelperTest < ActiveSupport::TestCase
assert current_page?(controller: 'foo', action: 'category', category: 'administraĆ§Ć£o', callback_url: 'http://example.com/foo')
end
+ def test_current_page_with_trailing_slash
+ @request = request_for_url("/posts")
+
+ assert current_page?("/posts/")
+ end
+
def test_link_unless_current
@request = request_for_url("/")