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
a2c48547
Commit
a2c48547
authored
Oct 05, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Boards::Lists::ListService to list lists for a specific board
parent
e46a4aab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
app/services/boards/lists/list_service.rb
app/services/boards/lists/list_service.rb
+9
-0
spec/services/boards/lists/list_service_spec.rb
spec/services/boards/lists/list_service_spec.rb
+18
-0
No files found.
app/services/boards/lists/list_service.rb
0 → 100644
View file @
a2c48547
module
Boards
module
Lists
class
ListService
<
Boards
::
BaseService
def
execute
(
board
)
board
.
lists
end
end
end
end
spec/services/boards/lists/list_service_spec.rb
0 → 100644
View file @
a2c48547
require
'spec_helper'
describe
Boards
::
Lists
::
ListService
,
services:
true
do
describe
'#execute'
do
it
"returns board's lists"
do
project
=
create
(
:empty_project
)
board
=
create
(
:board
,
project:
project
)
label
=
create
(
:label
,
project:
project
)
backlog_list
=
create
(
:backlog_list
,
board:
board
)
list
=
create
(
:list
,
board:
board
,
label:
label
)
done_list
=
create
(
:done_list
,
board:
board
)
service
=
described_class
.
new
(
project
,
double
)
expect
(
service
.
execute
(
board
)).
to
eq
[
backlog_list
,
list
,
done_list
]
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