BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8feba017
Commit
8feba017
authored
Dec 16, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs in Ruby 2.1
Ruby 2.1 requires a basename argument to `Tempfile.open`, so just call it something that makes sense in context for the spec.
parent
45bd2263
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
multipart_spec.rb
spec/lib/gitlab/middleware/multipart_spec.rb
+3
-3
No files found.
spec/lib/gitlab/middleware/multipart_spec.rb
View file @
8feba017
...
...
@@ -7,7 +7,7 @@ describe Gitlab::Middleware::Multipart do
let
(
:middleware
)
{
described_class
.
new
(
app
)
}
it
'opens top-level files'
do
Tempfile
.
open
do
|
tempfile
|
Tempfile
.
open
(
'top-level'
)
do
|
tempfile
|
env
=
post_env
({
'file'
=>
tempfile
.
path
},
{
'file.name'
=>
'filename'
},
Gitlab
::
Workhorse
.
secret
,
'gitlab-workhorse'
)
expect
(
app
).
to
receive
(
:call
)
do
|
env
|
...
...
@@ -33,7 +33,7 @@ describe Gitlab::Middleware::Multipart do
end
it
'opens files one level deep'
do
Tempfile
.
open
do
|
tempfile
|
Tempfile
.
open
(
'one-level'
)
do
|
tempfile
|
in_params
=
{
'user'
=>
{
'avatar'
=>
{
'.name'
=>
'filename'
}
}
}
env
=
post_env
({
'user[avatar]'
=>
tempfile
.
path
},
in_params
,
Gitlab
::
Workhorse
.
secret
,
'gitlab-workhorse'
)
...
...
@@ -48,7 +48,7 @@ describe Gitlab::Middleware::Multipart do
end
it
'opens files two levels deep'
do
Tempfile
.
open
do
|
tempfile
|
Tempfile
.
open
(
'two-levels'
)
do
|
tempfile
|
in_params
=
{
'project'
=>
{
'milestone'
=>
{
'themesong'
=>
{
'.name'
=>
'filename'
}
}
}
}
env
=
post_env
({
'project[milestone][themesong]'
=>
tempfile
.
path
},
in_params
,
Gitlab
::
Workhorse
.
secret
,
'gitlab-workhorse'
)
...
...
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