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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
aa97c0fd
Commit
aa97c0fd
authored
Aug 01, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `list_id` param to `id` in Boards::Lists::DestroyService
parent
0fb9210d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/services/boards/lists/destroy_service.rb
app/services/boards/lists/destroy_service.rb
+1
-1
spec/services/boards/lists/destroy_service_spec.rb
spec/services/boards/lists/destroy_service_spec.rb
+4
-4
No files found.
app/services/boards/lists/destroy_service.rb
View file @
aa97c0fd
...
...
@@ -20,7 +20,7 @@ module Boards
attr_reader
:board
,
:params
def
list
@list
||=
board
.
lists
.
find
(
params
[
:
list_
id
])
@list
||=
board
.
lists
.
find
(
params
[
:id
])
end
def
decrement_higher_lists
...
...
spec/services/boards/lists/destroy_service_spec.rb
View file @
aa97c0fd
...
...
@@ -8,7 +8,7 @@ describe Boards::Lists::DestroyService, services: true do
context
'when list type is label'
do
it
'removes list from board'
do
list
=
create
(
:list
,
board:
board
)
service
=
described_class
.
new
(
project
,
list_
id:
list
.
id
)
service
=
described_class
.
new
(
project
,
id:
list
.
id
)
expect
{
service
.
execute
}.
to
change
(
board
.
lists
,
:count
).
by
(
-
1
)
end
...
...
@@ -20,7 +20,7 @@ describe Boards::Lists::DestroyService, services: true do
staging
=
create
(
:list
,
board:
board
,
position:
3
)
done
=
create
(
:done_list
,
board:
board
)
described_class
.
new
(
project
,
list_
id:
development
.
id
).
execute
described_class
.
new
(
project
,
id:
development
.
id
).
execute
expect
(
backlog
.
reload
.
position
).
to
be_nil
expect
(
review
.
reload
.
position
).
to
eq
1
...
...
@@ -31,14 +31,14 @@ describe Boards::Lists::DestroyService, services: true do
it
'does not remove list from board when list type is backlog'
do
list
=
create
(
:backlog_list
,
board:
board
)
service
=
described_class
.
new
(
project
,
list_
id:
list
.
id
)
service
=
described_class
.
new
(
project
,
id:
list
.
id
)
expect
{
service
.
execute
}.
not_to
change
(
board
.
lists
,
:count
)
end
it
'does not remove list from board when list type is done'
do
list
=
create
(
:done_list
,
board:
board
)
service
=
described_class
.
new
(
project
,
list_
id:
list
.
id
)
service
=
described_class
.
new
(
project
,
id:
list
.
id
)
expect
{
service
.
execute
}.
not_to
change
(
board
.
lists
,
:count
)
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