Commit 2d27143f by pierallard Committed by Jon Yurek

Syntax from Hound notes

parent aaebf94d
...@@ -47,11 +47,12 @@ describe Paperclip::MediaTypeSpoofDetector do ...@@ -47,11 +47,12 @@ describe Paperclip::MediaTypeSpoofDetector do
it "does allow array as :content_type_mappings" do it "does allow array as :content_type_mappings" do
begin begin
Paperclip.options[:content_type_mappings] = { Paperclip.options[:content_type_mappings] = {
html: [ "binary", "text/html" ] html: ["binary", "text/html"]
} }
file = File.open(fixture_file("empty.html")) file = File.open(fixture_file("empty.html"))
assert !Paperclip::MediaTypeSpoofDetector spoofed = Paperclip::MediaTypeSpoofDetector.
.using(file, "empty.html").spoofed? using(file, "empty.html").spoofed?
assert !spoofed
ensure ensure
Paperclip.options[:content_type_mappings] = {} Paperclip.options[:content_type_mappings] = {}
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