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
7e42c229
Commit
7e42c229
authored
Dec 06, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 404 error when visit group label edit page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
469dfa43
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
11 deletions
+32
-11
config/routes/group.rb
config/routes/group.rb
+11
-11
spec/features/groups/labels/edit_spec.rb
spec/features/groups/labels/edit_spec.rb
+21
-0
No files found.
config/routes/group.rb
View file @
7e42c229
resources
:groups
,
only:
[
:index
,
:new
,
:create
]
resources
:groups
,
only:
[
:index
,
:new
,
:create
]
scope
(
path:
'groups/*id'
,
controller: :groups
,
constraints:
{
id:
Gitlab
::
Regex
.
namespace_route_regex
})
do
get
:edit
,
as: :edit_group
get
:issues
,
as: :issues_group
get
:merge_requests
,
as: :merge_requests_group
get
:projects
,
as: :projects_group
get
:activity
,
as: :activity_group
end
scope
(
path:
'groups/*group_id'
,
scope
(
path:
'groups/*group_id'
,
module: :groups
,
module: :groups
,
as: :group
,
as: :group
,
...
@@ -22,10 +12,20 @@ scope(path: 'groups/*group_id',
...
@@ -22,10 +12,20 @@ scope(path: 'groups/*group_id',
resource
:avatar
,
only:
[
:destroy
]
resource
:avatar
,
only:
[
:destroy
]
resources
:milestones
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:index
,
:show
,
:update
,
:new
,
:create
]
resources
:milestones
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:index
,
:show
,
:update
,
:new
,
:create
]
resources
:labels
,
except:
[
:show
]
,
constraints:
{
id:
/\d+/
}
do
resources
:labels
,
except:
[
:show
]
do
post
:toggle_subscription
,
on: :member
post
:toggle_subscription
,
on: :member
end
end
end
end
scope
(
path:
'groups/*id'
,
controller: :groups
,
constraints:
{
id:
Gitlab
::
Regex
.
namespace_route_regex
})
do
get
:edit
,
as: :edit_group
get
:issues
,
as: :issues_group
get
:merge_requests
,
as: :merge_requests_group
get
:projects
,
as: :projects_group
get
:activity
,
as: :activity_group
end
# Must be last route in this file
# Must be last route in this file
get
'groups/*id'
=>
'groups#show'
,
as: :group_canonical
,
constraints:
{
id:
Gitlab
::
Regex
.
namespace_route_regex
}
get
'groups/*id'
=>
'groups#show'
,
as: :group_canonical
,
constraints:
{
id:
Gitlab
::
Regex
.
namespace_route_regex
}
spec/features/groups/labels/edit_spec.rb
0 → 100644
View file @
7e42c229
require
'spec_helper'
feature
'Edit group label'
,
feature:
true
do
given
(
:user
)
{
create
(
:user
)
}
given
(
:group
)
{
create
(
:group
)
}
given
(
:label
)
{
create
(
:group_label
,
group:
group
)
}
background
do
group
.
add_owner
(
user
)
login_as
(
user
)
visit
edit_group_label_path
(
group
,
label
)
end
scenario
'update label with new title'
do
fill_in
'label_title'
,
with:
'new label name'
click_button
'Save changes'
expect
(
current_path
).
to
eq
(
root_path
)
expect
(
label
.
reload
.
title
).
to
eq
(
'new label name'
)
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