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
end
context "a url with query params" do
before do
@url = "https://github.com/thoughtbot/paperclip?file=test"
@subject = Paperclip.io_adapters.for(@url)
end
subject { Paperclip.io_adapters.for(url) }
after do
@subject.close
end
after { subject.close }
let(:url) { "https://github.com/thoughtbot/paperclip?file=test" }
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
......
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