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
c30b3257
Commit
c30b3257
authored
Jul 11, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests.
parent
bd09b2d5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
22 deletions
+15
-22
app/views/projects/protected_branches/index.html.haml
app/views/projects/protected_branches/index.html.haml
+1
-1
spec/controllers/help_controller_spec.rb
spec/controllers/help_controller_spec.rb
+5
-8
spec/routing/routing_spec.rb
spec/routing/routing_spec.rb
+9
-13
No files found.
app/views/projects/protected_branches/index.html.haml
View file @
c30b3257
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
=
f
.
label
:name
,
"Branch"
,
class:
"label-light"
=
f
.
label
:name
,
"Branch"
,
class:
"label-light"
=
render
partial:
"dropdown"
,
locals:
{
f:
f
}
=
render
partial:
"dropdown"
,
locals:
{
f:
f
}
%p
.help-block
%p
.help-block
=
link_to
"Wildcards"
,
help_page_path
(
category:
'workflow'
,
file:
'protected_branches'
,
format:
'md
'
,
anchor:
"wildcard-protected-branches"
)
=
link_to
"Wildcards"
,
help_page_path
(
'workflow/protected_branches
'
,
anchor:
"wildcard-protected-branches"
)
such as
such as
%code
*-stable
%code
*-stable
or
or
...
...
spec/controllers/help_controller_spec.rb
View file @
c30b3257
...
@@ -11,7 +11,7 @@ describe HelpController do
...
@@ -11,7 +11,7 @@ describe HelpController do
context
'for Markdown formats'
do
context
'for Markdown formats'
do
context
'when requested file exists'
do
context
'when requested file exists'
do
before
do
before
do
get
:show
,
category:
'ssh'
,
file:
'
README'
,
format: :md
get
:show
,
path:
'ssh/
README'
,
format: :md
end
end
it
'assigns to @markdown'
do
it
'assigns to @markdown'
do
...
@@ -26,7 +26,7 @@ describe HelpController do
...
@@ -26,7 +26,7 @@ describe HelpController do
context
'when requested file is missing'
do
context
'when requested file is missing'
do
it
'renders not found'
do
it
'renders not found'
do
get
:show
,
category:
'foo'
,
file:
'
bar'
,
format: :md
get
:show
,
path:
'foo/
bar'
,
format: :md
expect
(
response
).
to
be_not_found
expect
(
response
).
to
be_not_found
end
end
end
end
...
@@ -36,8 +36,7 @@ describe HelpController do
...
@@ -36,8 +36,7 @@ describe HelpController do
context
'when requested file exists'
do
context
'when requested file exists'
do
it
'renders the raw file'
do
it
'renders the raw file'
do
get
:show
,
get
:show
,
category:
'workflow/protected_branches'
,
path:
'workflow/protected_branches/protected_branches1'
,
file:
'protected_branches1'
,
format: :png
format: :png
expect
(
response
).
to
be_success
expect
(
response
).
to
be_success
expect
(
response
.
content_type
).
to
eq
'image/png'
expect
(
response
.
content_type
).
to
eq
'image/png'
...
@@ -48,8 +47,7 @@ describe HelpController do
...
@@ -48,8 +47,7 @@ describe HelpController do
context
'when requested file is missing'
do
context
'when requested file is missing'
do
it
'renders not found'
do
it
'renders not found'
do
get
:show
,
get
:show
,
category:
'foo'
,
path:
'foo/bar'
,
file:
'bar'
,
format: :png
format: :png
expect
(
response
).
to
be_not_found
expect
(
response
).
to
be_not_found
end
end
...
@@ -59,8 +57,7 @@ describe HelpController do
...
@@ -59,8 +57,7 @@ describe HelpController do
context
'for other formats'
do
context
'for other formats'
do
it
'always renders not found'
do
it
'always renders not found'
do
get
:show
,
get
:show
,
category:
'ssh'
,
path:
'ssh/README'
,
file:
'README'
,
format: :foo
format: :foo
expect
(
response
).
to
be_not_found
expect
(
response
).
to
be_not_found
end
end
...
...
spec/routing/routing_spec.rb
View file @
c30b3257
...
@@ -98,7 +98,7 @@ describe SnippetsController, "routing" do
...
@@ -98,7 +98,7 @@ describe SnippetsController, "routing" do
end
end
# help GET /help(.:format) help#index
# help GET /help(.:format) help#index
# help_page GET /help/
:category/:file(.:format) help#show {:category=>/.*/, :file=>/[^\/\.]+/}
# help_page GET /help/
*path(.:format) help#show
# help_shortcuts GET /help/shortcuts(.:format) help#shortcuts
# help_shortcuts GET /help/shortcuts(.:format) help#shortcuts
# help_ui GET /help/ui(.:format) help#ui
# help_ui GET /help/ui(.:format) help#ui
describe
HelpController
,
"routing"
do
describe
HelpController
,
"routing"
do
...
@@ -109,23 +109,19 @@ describe HelpController, "routing" do
...
@@ -109,23 +109,19 @@ describe HelpController, "routing" do
it
'to #show'
do
it
'to #show'
do
path
=
'/help/markdown/markdown.md'
path
=
'/help/markdown/markdown.md'
expect
(
get
(
path
)).
to
route_to
(
'help#show'
,
expect
(
get
(
path
)).
to
route_to
(
'help#show'
,
category:
'markdown'
,
path:
'markdown/markdown'
,
file:
'markdown'
,
format:
'md'
)
format:
'md'
)
path
=
'/help/workflow/protected_branches/protected_branches1.png'
path
=
'/help/workflow/protected_branches/protected_branches1.png'
expect
(
get
(
path
)).
to
route_to
(
'help#show'
,
expect
(
get
(
path
)).
to
route_to
(
'help#show'
,
category:
'workflow/protected_branches'
,
path:
'workflow/protected_branches/protected_branches1'
,
file:
'protected_branches1'
,
format:
'png'
)
format:
'png'
)
end
path
=
'/help/shortcuts'
expect
(
get
(
path
)).
to
route_to
(
'help#show'
,
it
'to #shortcuts'
do
path:
'shortcuts'
)
expect
(
get
(
'/help/shortcuts'
)).
to
route_to
(
'help#shortcuts'
)
path
=
'/help/ui'
end
expect
(
get
(
path
)).
to
route_to
(
'help#show'
,
path:
'ui'
)
it
'to #ui'
do
expect
(
get
(
'/help/ui'
)).
to
route_to
(
'help#ui'
)
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