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
1a2002d9
Commit
1a2002d9
authored
Oct 06, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update board specs to use board factory instead of project_with_board
parent
2c2a1dea
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
15 deletions
+15
-15
spec/controllers/projects/boards/lists_controller_spec.rb
spec/controllers/projects/boards/lists_controller_spec.rb
+2
-2
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+3
-2
spec/features/boards/new_issue_spec.rb
spec/features/boards/new_issue_spec.rb
+2
-1
spec/services/boards/issues/list_service_spec.rb
spec/services/boards/issues/list_service_spec.rb
+1
-1
spec/services/boards/lists/destroy_service_spec.rb
spec/services/boards/lists/destroy_service_spec.rb
+6
-6
spec/services/boards/lists/list_service_spec.rb
spec/services/boards/lists/list_service_spec.rb
+1
-3
No files found.
spec/controllers/projects/boards/lists_controller_spec.rb
View file @
1a2002d9
require
'spec_helper'
describe
Projects
::
Boards
::
ListsController
do
let
(
:project
)
{
create
(
:
project_with_board
)
}
let
(
:board
)
{
project
.
board
}
let
(
:project
)
{
create
(
:
empty_project
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:guest
)
{
create
(
:user
)
}
...
...
spec/features/boards/boards_spec.rb
View file @
1a2002d9
...
...
@@ -4,7 +4,8 @@ describe 'Issue Boards', feature: true, js: true do
include
WaitForAjax
include
WaitForVueResource
let
(
:project
)
{
create
(
:project_with_board
,
:public
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
let!
(
:user2
)
{
create
(
:user
)
}
...
...
spec/features/boards/new_issue_spec.rb
View file @
1a2002d9
...
...
@@ -4,7 +4,8 @@ describe 'Issue Boards new issue', feature: true, js: true do
include
WaitForAjax
include
WaitForVueResource
let
(
:project
)
{
create
(
:project_with_board
,
:public
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
context
'authorized user'
do
...
...
spec/services/boards/issues/list_service_spec.rb
View file @
1a2002d9
...
...
@@ -3,7 +3,7 @@ require 'spec_helper'
describe
Boards
::
Issues
::
ListService
,
services:
true
do
describe
'#execute'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:
project_with_board
)
}
let
(
:project
)
{
create
(
:
empty_project
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
...
...
spec/services/boards/lists/destroy_service_spec.rb
View file @
1a2002d9
...
...
@@ -2,8 +2,8 @@ require 'spec_helper'
describe
Boards
::
Lists
::
DestroyService
,
services:
true
do
describe
'#execute'
do
let
(
:project
)
{
create
(
:
project_with_board
)
}
let
(
:board
)
{
project
.
board
}
let
(
:project
)
{
create
(
:
empty_project
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
context
'when list type is label'
do
...
...
@@ -15,11 +15,11 @@ describe Boards::Lists::DestroyService, services: true do
end
it
'decrements position of higher lists'
do
backlog
=
project
.
board
.
backlog_list
backlog
=
board
.
backlog_list
development
=
create
(
:list
,
board:
board
,
position:
0
)
review
=
create
(
:list
,
board:
board
,
position:
1
)
staging
=
create
(
:list
,
board:
board
,
position:
2
)
done
=
project
.
board
.
done_list
done
=
board
.
done_list
described_class
.
new
(
project
,
user
).
execute
(
development
)
...
...
@@ -31,14 +31,14 @@ describe Boards::Lists::DestroyService, services: true do
end
it
'does not remove list from board when list type is backlog'
do
list
=
project
.
board
.
backlog_list
list
=
board
.
backlog_list
service
=
described_class
.
new
(
project
,
user
)
expect
{
service
.
execute
(
list
)
}.
not_to
change
(
board
.
lists
,
:count
)
end
it
'does not remove list from board when list type is done'
do
list
=
project
.
board
.
done_list
list
=
board
.
done_list
service
=
described_class
.
new
(
project
,
user
)
expect
{
service
.
execute
(
list
)
}.
not_to
change
(
board
.
lists
,
:count
)
...
...
spec/services/boards/lists/list_service_spec.rb
View file @
1a2002d9
...
...
@@ -6,13 +6,11 @@ describe Boards::Lists::ListService, services: true 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
[
b
acklog_list
,
list
,
done_list
]
expect
(
service
.
execute
(
board
)).
to
eq
[
b
oard
.
backlog_list
,
list
,
board
.
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