Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove UrlRewriter tests #48199

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 18 additions & 2 deletions actionpack/test/controller/url_for_test.rb
Original file line number Diff line number Diff line change
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.