Commit ef1f40c1 by Jon Yurek

Unsure why this was not done again

parent 83af529f
...@@ -18,12 +18,12 @@ describe Paperclip::MediaTypeSpoofDetector do ...@@ -18,12 +18,12 @@ describe Paperclip::MediaTypeSpoofDetector do
it 'does not reject a file that does not have a name' do it 'does not reject a file that does not have a name' do
file = File.open(fixture_file("empty.html")) file = File.open(fixture_file("empty.html"))
assert ! Paperclip::MediaTypeSpoofDetector.using(file, "", "").spoofed? assert ! Paperclip::MediaTypeSpoofDetector.using(file, "", "text/html").spoofed?
end end
it 'does not reject a file that does have an extension' do it 'does not reject a file that does have an extension' do
file = File.open(fixture_file("empty.html")) file = File.open(fixture_file("empty.html"))
assert ! Paperclip::MediaTypeSpoofDetector.using(file, "data", "").spoofed? assert ! Paperclip::MediaTypeSpoofDetector.using(file, "data", "text/html").spoofed?
end end
it 'does not reject when the supplied file is an IOAdapter' do it 'does not reject when the supplied file is an IOAdapter' do
...@@ -61,7 +61,7 @@ describe Paperclip::MediaTypeSpoofDetector do ...@@ -61,7 +61,7 @@ describe Paperclip::MediaTypeSpoofDetector do
} }
file = File.open(fixture_file('empty.html')) file = File.open(fixture_file('empty.html'))
spoofed = Paperclip::MediaTypeSpoofDetector spoofed = Paperclip::MediaTypeSpoofDetector
.using(file, 'empty.html').spoofed? .using(file, "empty.html", "text/html").spoofed?
assert !spoofed assert !spoofed
ensure ensure
Paperclip.options[:content_type_mappings] = {} Paperclip.options[:content_type_mappings] = {}
......
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