Skip to content

Commit

Permalink
Add passing tests for URI/Addressable::URI escape for 2.6/2.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Feb 11, 2021
1 parent 5bf82a9 commit 1171087
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/models/file_depot_ftp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ def putbinaryfile(local_path, remote_path)
end
end

context "#base_path" do
it "escaped characters" do
file_depot_ftp.uri = "ftp://ftpserver.com/path/abc 123 %^{}|\"<>\\.csv"
expect(file_depot_ftp.send(:base_path).to_s).to eq "path/abc%20123%20%25%5E%7B%7D%7C%22%3C%3E%5C.csv"
end

it "not escaped characters" do
file_depot_ftp.uri = "ftp://ftpserver.com/path/abc&$!@*()_+:-=;',./.csv"
expect(file_depot_ftp.send(:base_path).to_s).to eq "path/abc&$!@*()_+:-=;',./.csv"
end
end

context "#merged_uri" do
before do
file_depot_ftp.uri = uri
Expand Down

0 comments on commit 1171087

Please sign in to comment.