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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
69e5e260
Commit
69e5e260
authored
Oct 22, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for cloning Wiki over HTTP
parent
64a270a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
spec/lib/gitlab/backend/grack_auth_spec.rb
spec/lib/gitlab/backend/grack_auth_spec.rb
+16
-0
No files found.
spec/lib/gitlab/backend/grack_auth_spec.rb
View file @
69e5e260
...
@@ -50,6 +50,22 @@ describe Grack::Auth do
...
@@ -50,6 +50,22 @@ describe Grack::Auth do
end
end
end
end
context
"when the Wiki for a project exists"
do
before
do
@wiki
=
ProjectWiki
.
new
(
project
)
env
[
"PATH_INFO"
]
=
"
#{
@wiki
.
repository
.
path_with_namespace
}
.git/info/refs"
project
.
update_attribute
(
:visibility_level
,
Project
::
PUBLIC
)
end
it
"responds with the right project"
do
response
=
auth
.
call
(
env
)
json_body
=
ActiveSupport
::
JSON
.
decode
(
response
[
2
][
0
])
expect
(
response
.
first
).
to
eq
(
200
)
expect
(
json_body
[
'RepoPath'
]).
to
include
(
@wiki
.
repository
.
path_with_namespace
)
end
end
context
"when the project exists"
do
context
"when the project exists"
do
before
do
before
do
env
[
"PATH_INFO"
]
=
project
.
path_with_namespace
+
".git"
env
[
"PATH_INFO"
]
=
project
.
path_with_namespace
+
".git"
...
...
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