Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
0406a357
Commit
0406a357
authored
Jan 03, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't delete files from spec/fixtures
parent
ec273b8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spec/uploaders/file_uploader_spec.rb
spec/uploaders/file_uploader_spec.rb
+3
-3
No files found.
spec/uploaders/file_uploader_spec.rb
View file @
0406a357
...
...
@@ -17,7 +17,7 @@ describe FileUploader do
describe
'#image_or_video?'
do
context
'given an image file'
do
before
do
@uploader
.
store!
(
File
.
new
(
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'rails_sample.jpg'
)))
@uploader
.
store!
(
fixture_file_upload
(
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'rails_sample.jpg'
)))
end
it
'detects an image based on file extension'
do
...
...
@@ -27,7 +27,7 @@ describe FileUploader do
context
'given an video file'
do
before
do
video_file
=
File
.
new
(
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'video_sample.mp4'
))
video_file
=
fixture_file_upload
(
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'video_sample.mp4'
))
@uploader
.
store!
(
video_file
)
end
...
...
@@ -37,7 +37,7 @@ describe FileUploader do
end
it
'does not return image_or_video? for other types'
do
@uploader
.
store!
(
File
.
new
(
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'doc_sample.txt'
)))
@uploader
.
store!
(
fixture_file_upload
(
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'doc_sample.txt'
)))
expect
(
@uploader
.
image_or_video?
).
to
be
false
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