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
Tatuya Kamada
gitlab-ce
Commits
ce44e5a7
Commit
ce44e5a7
authored
Mar 23, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing Dashboard::LabelsController
parent
e989d12b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
app/controllers/dashboard/labels_controller.rb
app/controllers/dashboard/labels_controller.rb
+9
-0
spec/features/dashboard_milestones_spec.rb
spec/features/dashboard_milestones_spec.rb
+29
-0
No files found.
app/controllers/dashboard/labels_controller.rb
0 → 100644
View file @
ce44e5a7
class
Dashboard::LabelsController
<
Dashboard
::
ApplicationController
def
index
labels
=
Label
.
where
(
project_id:
projects
).
select
(
:title
,
:color
).
uniq
(
:title
)
respond_to
do
|
format
|
format
.
json
{
render
json:
labels
}
end
end
end
spec/features/dashboard_milestones_spec.rb
0 → 100644
View file @
ce44e5a7
require
'spec_helper'
feature
'Dashboard > Milestones'
,
feature:
true
do
describe
'as anonymous user'
do
before
do
visit
dashboard_milestones_path
end
it
'is redirected to sign-in page'
do
expect
(
current_path
).
to
eq
new_user_session_path
end
end
describe
'as logged-in user'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
,
namespace:
user
.
namespace
)
}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
before
do
project
.
team
<<
[
user
,
:master
]
login_with
(
user
)
visit
dashboard_milestones_path
end
it
'sees milestones'
do
expect
(
current_path
).
to
eq
dashboard_milestones_path
expect
(
page
).
to
have_content
(
milestone
.
title
)
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