Commit aaebf94d by pierallard Committed by Jon Yurek

Syntax from Hound notes

parent ea142d80
......@@ -31,7 +31,7 @@ module Paperclip
end
def mapping_override_mismatch?
! Array(mapped_content_type).include?(calculated_content_type)
!Array(mapped_content_type).include?(calculated_content_type)
end
def supplied_file_media_types
......
......@@ -44,11 +44,14 @@ describe Paperclip::MediaTypeSpoofDetector do
end
end
it 'doest allow array as :content_type_mappings' do
it "does allow array as :content_type_mappings" do
begin
Paperclip.options[:content_type_mappings] = { html: [ "binary", "text/html" ] }
Paperclip.options[:content_type_mappings] = {
html: [ "binary", "text/html" ]
}
file = File.open(fixture_file("empty.html"))
assert ! Paperclip::MediaTypeSpoofDetector.using(file, "empty.html").spoofed?
assert !Paperclip::MediaTypeSpoofDetector
.using(file, "empty.html").spoofed?
ensure
Paperclip.options[:content_type_mappings] = {}
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