Commit 2c0760b5 by Roderick Monje Committed by Sid Raval

Test coverage for preserving params in file URLs

parent e5d97597
...@@ -69,17 +69,18 @@ describe Paperclip::HttpUrlProxyAdapter do ...@@ -69,17 +69,18 @@ describe Paperclip::HttpUrlProxyAdapter do
end end
context "a url with query params" do context "a url with query params" do
before do subject { Paperclip.io_adapters.for(url) }
@url = "https://github.com/thoughtbot/paperclip?file=test"
@subject = Paperclip.io_adapters.for(@url)
end
after do after { subject.close }
@subject.close
end let(:url) { "https://github.com/thoughtbot/paperclip?file=test" }
it "returns a file name" do it "returns a file name" do
assert_equal "paperclip", @subject.original_filename assert_equal "paperclip", subject.original_filename
end
it "preserves params" do
assert_equal url, subject.instance_variable_get(:@target).to_s
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment