BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
15 deletions
+15
-15
lists_controller_spec.rb
spec/controllers/projects/boards/lists_controller_spec.rb
+2
-2
boards_spec.rb
spec/features/boards/boards_spec.rb
+3
-2
new_issue_spec.rb
spec/features/boards/new_issue_spec.rb
+2
-1
list_service_spec.rb
spec/services/boards/issues/list_service_spec.rb
+1
-1
destroy_service_spec.rb
spec/services/boards/lists/destroy_service_spec.rb
+6
-6
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
)
}
...
...
@@ -468,7 +469,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'removes filtered labels'
do
wait_for_vue_resource
page
.
within
'.labels-filter'
do
click_button
(
'Label'
)
wait_for_ajax
...
...
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