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
ef1f40c1
Commit
ef1f40c1
authored
9 years ago
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unsure why this was not done again
parent
83af529f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spec/paperclip/media_type_spoof_detector_spec.rb
+3
-3
No files found.
spec/paperclip/media_type_spoof_detector_spec.rb
View file @
ef1f40c1
...
@@ -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
]
=
{}
...
...
This diff is collapsed.
Click to expand it.
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