Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
2d27143f
Commit
2d27143f
authored
Mar 27, 2015
by
pierallard
Committed by
Jon Yurek
Apr 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syntax from Hound notes
parent
aaebf94d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
spec/paperclip/media_type_spoof_detector_spec.rb
+4
-3
No files found.
spec/paperclip/media_type_spoof_detector_spec.rb
View file @
2d27143f
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment