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
Léo-Paul Géneau
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
Hide 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
...
@@ -2,6 +2,8 @@ FactoryGirl.define do
factory
:list
do
factory
:list
do
board
board
label
label
list_type
:label
sequence
(
:position
)
end
end
factory
:backlog_list
,
parent: :list
do
factory
:backlog_list
,
parent: :list
do
...
@@ -10,11 +12,6 @@ FactoryGirl.define do
...
@@ -10,11 +12,6 @@ FactoryGirl.define do
position
nil
position
nil
end
end
factory
:label_list
,
parent: :list
do
list_type
:label
sequence
(
:position
)
end
factory
:done_list
,
parent: :list
do
factory
:done_list
,
parent: :list
do
list_type
:done
list_type
:done
label
nil
label
nil
...
...
spec/models/list_spec.rb
View file @
baec3d23
...
@@ -34,7 +34,7 @@ describe List do
...
@@ -34,7 +34,7 @@ describe List do
describe
'#destroy'
do
describe
'#destroy'
do
it
'can be destroyed when when list_type is set to label'
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
expect
(
subject
.
destroy
).
to
be_truthy
end
end
...
...
spec/services/boards/issues/move_service_spec.rb
View file @
baec3d23
...
@@ -11,8 +11,8 @@ describe Boards::Issues::MoveService, services: true do
...
@@ -11,8 +11,8 @@ describe Boards::Issues::MoveService, services: true do
let
(
:testing
)
{
create
(
:label
,
project:
project
,
name:
'Testing'
)
}
let
(
:testing
)
{
create
(
:label
,
project:
project
,
name:
'Testing'
)
}
let
(
:backlog
)
{
create
(
:backlog_list
,
board:
board
)
}
let
(
:backlog
)
{
create
(
:backlog_list
,
board:
board
)
}
let
(
:list1
)
{
create
(
:l
abel_l
ist
,
board:
board
,
label:
development
)
}
let
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
development
)
}
let
(
:list2
)
{
create
(
:l
abel_l
ist
,
board:
board
,
label:
testing
)
}
let
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
testing
)
}
let
(
:done
)
{
create
(
:done_list
,
board:
board
)
}
let
(
:done
)
{
create
(
:done_list
,
board:
board
)
}
before
do
before
do
...
...
spec/services/boards/lists/create_service_spec.rb
View file @
baec3d23
...
@@ -28,8 +28,8 @@ describe Boards::Lists::CreateService, services: true do
...
@@ -28,8 +28,8 @@ describe Boards::Lists::CreateService, services: true do
context
'when board lists has only labels lists'
do
context
'when board lists has only labels lists'
do
it
'creates a new list at end of the lists'
do
it
'creates a new list at end of the lists'
do
create
(
:l
abel_l
ist
,
board:
board
,
position:
1
)
create
(
:list
,
board:
board
,
position:
1
)
create
(
:l
abel_l
ist
,
board:
board
,
position:
2
)
create
(
:list
,
board:
board
,
position:
2
)
list
=
described_class
.
new
(
project
,
label_id:
label
.
id
).
execute
list
=
described_class
.
new
(
project
,
label_id:
label
.
id
).
execute
...
@@ -41,7 +41,7 @@ describe Boards::Lists::CreateService, services: true do
...
@@ -41,7 +41,7 @@ describe Boards::Lists::CreateService, services: true do
it
'creates a new list at end of the label lists'
do
it
'creates a new list at end of the label lists'
do
create
(
:backlog_list
,
board:
board
)
create
(
:backlog_list
,
board:
board
)
create
(
:done_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
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
...
@@ -7,7 +7,7 @@ describe Boards::Lists::DestroyService, services: true do
context
'when list type is label'
do
context
'when list type is label'
do
it
'removes list from board'
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
)
service
=
described_class
.
new
(
project
,
list_id:
list
.
id
)
expect
{
service
.
execute
}.
to
change
(
board
.
lists
,
:count
).
by
(
-
1
)
expect
{
service
.
execute
}.
to
change
(
board
.
lists
,
:count
).
by
(
-
1
)
...
@@ -15,9 +15,9 @@ describe Boards::Lists::DestroyService, services: true do
...
@@ -15,9 +15,9 @@ describe Boards::Lists::DestroyService, services: true do
it
'decrements position of higher lists'
do
it
'decrements position of higher lists'
do
backlog
=
create
(
:backlog_list
,
board:
board
)
backlog
=
create
(
:backlog_list
,
board:
board
)
development
=
create
(
:l
abel_l
ist
,
board:
board
,
position:
1
)
development
=
create
(
:list
,
board:
board
,
position:
1
)
review
=
create
(
:l
abel_l
ist
,
board:
board
,
position:
2
)
review
=
create
(
:list
,
board:
board
,
position:
2
)
staging
=
create
(
:l
abel_l
ist
,
board:
board
,
position:
3
)
staging
=
create
(
:list
,
board:
board
,
position:
3
)
done
=
create
(
:done_list
,
board:
board
)
done
=
create
(
:done_list
,
board:
board
)
described_class
.
new
(
project
,
list_id:
development
.
id
).
execute
described_class
.
new
(
project
,
list_id:
development
.
id
).
execute
...
...
spec/services/boards/lists/move_service_spec.rb
View file @
baec3d23
...
@@ -6,11 +6,11 @@ describe Boards::Lists::MoveService, services: true do
...
@@ -6,11 +6,11 @@ describe Boards::Lists::MoveService, services: true do
let
(
:board
)
{
project
.
board
}
let
(
:board
)
{
project
.
board
}
let!
(
:backlog
)
{
create
(
:backlog_list
,
board:
board
)
}
let!
(
:backlog
)
{
create
(
:backlog_list
,
board:
board
)
}
let!
(
:planning
)
{
create
(
:l
abel_list
,
board:
board
,
position:
1
)
}
let!
(
:planning
)
{
create
(
:l
ist
,
board:
board
,
position:
1
)
}
let!
(
:development
)
{
create
(
:l
abel_list
,
board:
board
,
position:
2
)
}
let!
(
:development
)
{
create
(
:l
ist
,
board:
board
,
position:
2
)
}
let!
(
:review
)
{
create
(
:l
abel_list
,
board:
board
,
position:
3
)
}
let!
(
:review
)
{
create
(
:l
ist
,
board:
board
,
position:
3
)
}
let!
(
:staging
)
{
create
(
:l
abel_list
,
board:
board
,
position:
4
)
}
let!
(
:staging
)
{
create
(
:l
ist
,
board:
board
,
position:
4
)
}
let!
(
:done
)
{
create
(
:done_list
,
board:
board
)
}
let!
(
:done
)
{
create
(
:done_list
,
board:
board
)
}
context
'when list type is set to label'
do
context
'when list type is set to label'
do
it
'keeps position of lists when new position is nil'
do
it
'keeps position of lists when new position is nil'
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