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
baec3d23
Commit
baec3d23
authored
Jul 31, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove label_list factory
parent
4b75c750
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
20 deletions
+17
-20
spec/factories/lists.rb
spec/factories/lists.rb
+2
-5
spec/models/list_spec.rb
spec/models/list_spec.rb
+1
-1
spec/services/boards/issues/move_service_spec.rb
spec/services/boards/issues/move_service_spec.rb
+2
-2
spec/services/boards/lists/create_service_spec.rb
spec/services/boards/lists/create_service_spec.rb
+3
-3
spec/services/boards/lists/destroy_service_spec.rb
spec/services/boards/lists/destroy_service_spec.rb
+4
-4
spec/services/boards/lists/move_service_spec.rb
spec/services/boards/lists/move_service_spec.rb
+5
-5
No files found.
spec/factories/lists.rb
View file @
baec3d23
...
...
@@ -2,6 +2,8 @@ FactoryGirl.define do
factory
:list
do
board
label
list_type
:label
sequence
(
:position
)
end
factory
:backlog_list
,
parent: :list
do
...
...
@@ -10,11 +12,6 @@ FactoryGirl.define do
position
nil
end
factory
:label_list
,
parent: :list
do
list_type
:label
sequence
(
:position
)
end
factory
:done_list
,
parent: :list
do
list_type
:done
label
nil
...
...
spec/models/list_spec.rb
View file @
baec3d23
...
...
@@ -34,7 +34,7 @@ describe List do
describe
'#destroy'
do
it
'can be destroyed when when list_type is set to label'
do
subject
=
create
(
:l
abel_l
ist
)
subject
=
create
(
:list
)
expect
(
subject
.
destroy
).
to
be_truthy
end
...
...
spec/services/boards/issues/move_service_spec.rb
View file @
baec3d23
...
...
@@ -11,8 +11,8 @@ describe Boards::Issues::MoveService, services: true do
let
(
:testing
)
{
create
(
:label
,
project:
project
,
name:
'Testing'
)
}
let
(
:backlog
)
{
create
(
:backlog_list
,
board:
board
)
}
let
(
:list1
)
{
create
(
:l
abel_l
ist
,
board:
board
,
label:
development
)
}
let
(
:list2
)
{
create
(
:l
abel_l
ist
,
board:
board
,
label:
testing
)
}
let
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
development
)
}
let
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
testing
)
}
let
(
:done
)
{
create
(
:done_list
,
board:
board
)
}
before
do
...
...
spec/services/boards/lists/create_service_spec.rb
View file @
baec3d23
...
...
@@ -28,8 +28,8 @@ describe Boards::Lists::CreateService, services: true do
context
'when board lists has only labels lists'
do
it
'creates a new list at end of the lists'
do
create
(
:l
abel_l
ist
,
board:
board
,
position:
1
)
create
(
:l
abel_l
ist
,
board:
board
,
position:
2
)
create
(
:list
,
board:
board
,
position:
1
)
create
(
:list
,
board:
board
,
position:
2
)
list
=
described_class
.
new
(
project
,
label_id:
label
.
id
).
execute
...
...
@@ -41,7 +41,7 @@ describe Boards::Lists::CreateService, services: true do
it
'creates a new list at end of the label lists'
do
create
(
:backlog_list
,
board:
board
)
create
(
:done_list
,
board:
board
)
list1
=
create
(
:l
abel_l
ist
,
board:
board
,
position:
1
)
list1
=
create
(
:list
,
board:
board
,
position:
1
)
list2
=
described_class
.
new
(
project
,
label_id:
label
.
id
).
execute
...
...
spec/services/boards/lists/destroy_service_spec.rb
View file @
baec3d23
...
...
@@ -7,7 +7,7 @@ describe Boards::Lists::DestroyService, services: true do
context
'when list type is label'
do
it
'removes list from board'
do
list
=
create
(
:l
abel_l
ist
,
board:
board
)
list
=
create
(
:list
,
board:
board
)
service
=
described_class
.
new
(
project
,
list_id:
list
.
id
)
expect
{
service
.
execute
}.
to
change
(
board
.
lists
,
:count
).
by
(
-
1
)
...
...
@@ -15,9 +15,9 @@ describe Boards::Lists::DestroyService, services: true do
it
'decrements position of higher lists'
do
backlog
=
create
(
:backlog_list
,
board:
board
)
development
=
create
(
:l
abel_l
ist
,
board:
board
,
position:
1
)
review
=
create
(
:l
abel_l
ist
,
board:
board
,
position:
2
)
staging
=
create
(
:l
abel_l
ist
,
board:
board
,
position:
3
)
development
=
create
(
:list
,
board:
board
,
position:
1
)
review
=
create
(
:list
,
board:
board
,
position:
2
)
staging
=
create
(
:list
,
board:
board
,
position:
3
)
done
=
create
(
:done_list
,
board:
board
)
described_class
.
new
(
project
,
list_id:
development
.
id
).
execute
...
...
spec/services/boards/lists/move_service_spec.rb
View file @
baec3d23
...
...
@@ -6,10 +6,10 @@ describe Boards::Lists::MoveService, services: true do
let
(
:board
)
{
project
.
board
}
let!
(
:backlog
)
{
create
(
:backlog_list
,
board:
board
)
}
let!
(
:planning
)
{
create
(
:l
abel_list
,
board:
board
,
position:
1
)
}
let!
(
:development
)
{
create
(
:l
abel_list
,
board:
board
,
position:
2
)
}
let!
(
:review
)
{
create
(
:l
abel_list
,
board:
board
,
position:
3
)
}
let!
(
:staging
)
{
create
(
:l
abel_list
,
board:
board
,
position:
4
)
}
let!
(
:planning
)
{
create
(
:l
ist
,
board:
board
,
position:
1
)
}
let!
(
:development
)
{
create
(
:l
ist
,
board:
board
,
position:
2
)
}
let!
(
:review
)
{
create
(
:l
ist
,
board:
board
,
position:
3
)
}
let!
(
:staging
)
{
create
(
:l
ist
,
board:
board
,
position:
4
)
}
let!
(
:done
)
{
create
(
:done_list
,
board:
board
)
}
context
'when list type is set to label'
do
...
...
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