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
Léo-Paul Géneau
gitlab-ce
Commits
b64cbacc
Commit
b64cbacc
authored
Apr 22, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove trivial 'let'
parent
c161065e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
spec/requests/git_http_spec.rb
spec/requests/git_http_spec.rb
+5
-6
No files found.
spec/requests/git_http_spec.rb
View file @
b64cbacc
...
@@ -54,7 +54,6 @@ describe 'Git HTTP requests', lib: true do
...
@@ -54,7 +54,6 @@ describe 'Git HTTP requests', lib: true do
context
"when the project exists"
do
context
"when the project exists"
do
let
(
:path
)
{
"
#{
project
.
path_with_namespace
}
.git"
}
let
(
:path
)
{
"
#{
project
.
path_with_namespace
}
.git"
}
let
(
:env
)
{
{}
}
context
"when the project is public"
do
context
"when the project is public"
do
before
do
before
do
...
@@ -62,13 +61,13 @@ describe 'Git HTTP requests', lib: true do
...
@@ -62,13 +61,13 @@ describe 'Git HTTP requests', lib: true do
end
end
it
"downloads get status 200"
do
it
"downloads get status 200"
do
download
(
path
,
env
)
do
|
response
|
download
(
path
,
{}
)
do
|
response
|
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
response
.
status
).
to
eq
(
200
)
end
end
end
end
it
"uploads get status 401"
do
it
"uploads get status 401"
do
upload
(
path
,
env
)
do
|
response
|
upload
(
path
,
{}
)
do
|
response
|
expect
(
response
.
status
).
to
eq
(
401
)
expect
(
response
.
status
).
to
eq
(
401
)
end
end
end
end
...
@@ -97,7 +96,7 @@ describe 'Git HTTP requests', lib: true do
...
@@ -97,7 +96,7 @@ describe 'Git HTTP requests', lib: true do
it
"responds with status 404"
do
it
"responds with status 404"
do
allow
(
Gitlab
.
config
.
gitlab_shell
).
to
receive
(
:upload_pack
).
and_return
(
false
)
allow
(
Gitlab
.
config
.
gitlab_shell
).
to
receive
(
:upload_pack
).
and_return
(
false
)
download
(
path
,
env
)
do
|
response
|
download
(
path
,
{}
)
do
|
response
|
expect
(
response
.
status
).
to
eq
(
404
)
expect
(
response
.
status
).
to
eq
(
404
)
end
end
end
end
...
@@ -111,13 +110,13 @@ describe 'Git HTTP requests', lib: true do
...
@@ -111,13 +110,13 @@ describe 'Git HTTP requests', lib: true do
context
"when no authentication is provided"
do
context
"when no authentication is provided"
do
it
"responds with status 401 to downloads"
do
it
"responds with status 401 to downloads"
do
download
(
path
,
env
)
do
|
response
|
download
(
path
,
{}
)
do
|
response
|
expect
(
response
.
status
).
to
eq
(
401
)
expect
(
response
.
status
).
to
eq
(
401
)
end
end
end
end
it
"responds with status 401 to uploads"
do
it
"responds with status 401 to uploads"
do
upload
(
path
,
env
)
do
|
response
|
upload
(
path
,
{}
)
do
|
response
|
expect
(
response
.
status
).
to
eq
(
401
)
expect
(
response
.
status
).
to
eq
(
401
)
end
end
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