Skip to content

Commit

Permalink
Merge pull request #48199 from JoeDupuis/remove-url-rewriter-tests
Browse files Browse the repository at this point in the history
Remove UrlRewriter tests
  • Loading branch information
rafaelfranca committed May 30, 2023
2 parents 6bb8bd3 + acdfef2 commit 7eeaadb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 94 deletions.
20 changes: 18 additions & 2 deletions actionpack/test/controller/url_for_test.rb
Expand Up @@ -77,8 +77,8 @@ def test_false_anchor
end

def test_anchor_should_call_to_param
assert_equal("/c/a#anchor",
W.new.url_for(only_path: true, controller: "c", action: "a", anchor: Struct.new(:to_param).new("anchor"))
assert_equal("/c/a/i#anchor",
W.new.url_for(only_path: true, controller: "c", action: "a", id: "i", anchor: Struct.new(:to_param).new("anchor"))
)
end

Expand Down Expand Up @@ -215,6 +215,22 @@ def test_without_protocol_and_with_port
)
end

def test_user_name_and_password
add_host!
assert_equal(
"http://david:secret@www.basecamphq.com/c/a/i",
W.new.url_for(user: "david", password: "secret", controller: "c", action: "a", id: "i")
)
end

def test_user_name_and_password_with_escape_codes
add_host!
assert_equal(
"http://openid.aol.com%2Fnextangler:one+two%3F@www.basecamphq.com/c/a/i",
W.new.url_for(user: "openid.aol.com/nextangler", password: "one two?", controller: "c", action: "a", id: "i")
)
end

def test_trailing_slash
add_host!
options = { controller: "foo", trailing_slash: true, action: "bar", id: "33" }
Expand Down
92 changes: 0 additions & 92 deletions actionpack/test/controller/url_rewriter_test.rb

This file was deleted.

0 comments on commit 7eeaadb

Please sign in to comment.