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
34401f4b
Commit
34401f4b
authored
Aug 04, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
5af902eb
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
31 additions
and
34 deletions
+31
-34
app/controllers/projects/boards_controller.rb
app/controllers/projects/boards_controller.rb
+1
-1
app/services/boards/issues/list_service.rb
app/services/boards/issues/list_service.rb
+1
-1
spec/factories/boards.rb
spec/factories/boards.rb
+1
-1
spec/features/boards/ee/boards_spec.rb
spec/features/boards/ee/boards_spec.rb
+0
-24
spec/fixtures/api/schemas/issue.json
spec/fixtures/api/schemas/issue.json
+5
-0
spec/models/ee/board_spec.rb
spec/models/ee/board_spec.rb
+16
-0
spec/services/boards/issues/create_service_spec.rb
spec/services/boards/issues/create_service_spec.rb
+1
-1
spec/services/ee/boards/create_service_spec.rb
spec/services/ee/boards/create_service_spec.rb
+1
-1
spec/services/ee/boards/issues/list_service_spec.rb
spec/services/ee/boards/issues/list_service_spec.rb
+3
-3
spec/services/ee/boards/issues/move_service_spec.rb
spec/services/ee/boards/issues/move_service_spec.rb
+1
-1
spec/services/ee/boards/list_service_spec.rb
spec/services/ee/boards/list_service_spec.rb
+1
-1
No files found.
app/controllers/projects/boards_controller.rb
View file @
34401f4b
...
...
@@ -15,7 +15,7 @@ class Projects::BoardsController < Projects::ApplicationController
def
show
@board
=
project
.
boards
.
find
(
params
[
:id
])
respond_with_board
s
respond_with_board
end
private
...
...
app/services/boards/issues/list_service.rb
View file @
34401f4b
...
...
@@ -41,7 +41,7 @@ module Boards
end
def
set_parent
params
[
:project_id
]
=
parent
.
id
params
[
:project_id
]
=
@
parent
.
id
end
def
set_state
...
...
spec/factories/boards.rb
View file @
34401f4b
...
...
@@ -23,7 +23,7 @@ FactoryGirl.define do
id
=
evaluator
.
parent
.
id
evaluator
.
parent
.
is_a?
(
Group
)
?
board
.
group_id
=
id
:
evaluator
.
project_id
=
id
else
board
.
project
=
create
(
:
empty_project
)
board
.
project
=
create
(
:
project
,
:empty_repo
)
end
end
...
...
spec/features/boards/ee/boards_spec.rb
View file @
34401f4b
...
...
@@ -10,30 +10,6 @@ describe 'issue boards', :js do
login_as
(
user
)
end
context
'validations'
do
context
'when group is present'
do
it
'does not validate project presence'
do
group
=
create
(
:group
)
board
=
described_class
.
new
(
group:
group
)
expect
(
board
).
not_to
validate_presence_of
(
:project
)
expect
(
board
).
to
validate_presence_of
(
:group
)
end
end
context
'when project is present'
do
it
'does not validate group presence'
do
project
=
create
(
:project
)
board
=
described_class
.
new
(
project:
project
)
expect
(
board
).
to
validate_presence_of
(
:project
)
expect
(
board
).
not_to
validate_presence_of
(
:group
)
end
end
end
context
'issue board focus mode'
do
it
'shows the button when the feature is enabled'
do
stub_licensed_features
(
issue_board_focus_mode:
true
)
...
...
spec/fixtures/api/schemas/issue.json
View file @
34401f4b
...
...
@@ -8,10 +8,15 @@
"properties"
:
{
"id"
:
{
"type"
:
"integer"
},
"iid"
:
{
"type"
:
"integer"
},
"project_id"
:
{
"type"
:
[
"integer"
,
"null"
]
},
"title"
:
{
"type"
:
"string"
},
"confidential"
:
{
"type"
:
"boolean"
},
"due_date"
:
{
"type"
:
[
"date"
,
"null"
]
},
"relative_position"
:
{
"type"
:
"integer"
},
"project"
:
{
"id"
:
{
"type"
:
"integer"
},
"path"
:
{
"type"
:
"string"
}
},
"labels"
:
{
"type"
:
"array"
,
"items"
:
{
...
...
spec/models/ee/board_spec.rb
View file @
34401f4b
require
'spec_helper'
describe
Board
do
context
'validations'
do
context
'when group is present'
do
subject
{
described_class
.
new
(
group:
create
(
:group
))
}
it
{
is_expected
.
not_to
validate_presence_of
(
:project
)
}
it
{
is_expected
.
to
validate_presence_of
(
:group
)
}
end
context
'when project is present'
do
subject
{
described_class
.
new
(
project:
create
(
:project
))
}
it
{
is_expected
.
to
validate_presence_of
(
:project
)
}
it
{
is_expected
.
not_to
validate_presence_of
(
:group
)
}
end
end
describe
'milestone'
do
subject
(
:board
)
{
build
(
:board
)
}
...
...
spec/services/boards/issues/create_service_spec.rb
View file @
34401f4b
...
...
@@ -8,7 +8,7 @@ describe Boards::Issues::CreateService do
let
(
:label
)
{
create
(
:label
,
project:
project
,
name:
'in-progress'
)
}
let!
(
:list
)
{
create
(
:list
,
board:
board
,
label:
label
,
position:
0
)
}
subject
(
:service
)
{
described_class
.
new
(
project
,
user
,
board_id:
board
.
id
,
list_id:
list
.
id
,
title:
'New issue'
)
}
subject
(
:service
)
{
described_class
.
new
(
board
.
parent
,
project
,
user
,
board_id:
board
.
id
,
list_id:
list
.
id
,
title:
'New issue'
)
}
before
do
project
.
team
<<
[
user
,
:developer
]
...
...
spec/services/ee/boards/create_service_spec.rb
View file @
34401f4b
...
...
@@ -65,7 +65,7 @@ describe Boards::CreateService, services: true do
describe
'#execute'
do
it_behaves_like
'boards create service'
do
let
(
:parent
)
{
create
(
:
empty_project
)
}
let
(
:parent
)
{
create
(
:
project
,
:empty_repo
)
}
end
it_behaves_like
'boards create service'
do
...
...
spec/services/ee/boards/issues/list_service_spec.rb
View file @
34401f4b
...
...
@@ -4,8 +4,8 @@ describe Boards::Issues::ListService, services: true do
describe
'#execute'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:
empty_project
,
namespace:
group
)
}
let
(
:project1
)
{
create
(
:
empty_project
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:
project
,
:empty_repo
,
namespace:
group
)
}
let
(
:project1
)
{
create
(
:
project
,
:empty_repo
,
namespace:
group
)
}
let
(
:board
)
{
create
(
:board
,
group:
group
)
}
let
(
:m1
)
{
create
(
:milestone
,
group:
group
)
}
...
...
@@ -26,7 +26,7 @@ describe Boards::Issues::ListService, services: true do
let!
(
:opened_issue1
)
{
create
(
:labeled_issue
,
project:
project
,
milestone:
m1
,
title:
'Issue 1'
,
labels:
[
bug
])
}
let!
(
:opened_issue2
)
{
create
(
:labeled_issue
,
project:
project
,
milestone:
m2
,
title:
'Issue 2'
,
labels:
[
p2
])
}
let!
(
:reopened_issue1
)
{
create
(
:issue
,
:reopened
,
project:
project
,
title:
'Issue 3'
)
}
let!
(
:reopened_issue1
)
{
create
(
:issue
,
state:
'opened'
,
project:
project
,
title:
'Issue 3'
,
closed_at:
Time
.
now
)
}
let!
(
:list1_issue1
)
{
create
(
:labeled_issue
,
project:
project
,
milestone:
m1
,
labels:
[
p2
,
development
])
}
let!
(
:list1_issue2
)
{
create
(
:labeled_issue
,
project:
project
,
milestone:
m2
,
labels:
[
development
])
}
...
...
spec/services/ee/boards/issues/move_service_spec.rb
View file @
34401f4b
...
...
@@ -74,7 +74,7 @@ describe Boards::Issues::MoveService, services: true do
issue
.
reload
expect
(
issue
.
labels
).
to
contain_exactly
(
bug
,
testing
)
expect
(
issue
).
to
be_reopened
expect
(
issue
.
state
).
to
eq
(
"opened"
)
end
end
...
...
spec/services/ee/boards/list_service_spec.rb
View file @
34401f4b
...
...
@@ -23,7 +23,7 @@ describe Boards::ListService do
end
it_behaves_like
'boards list service'
do
let
(
:parent
)
{
create
(
:
empty_project
)
}
let
(
:parent
)
{
create
(
:
project
,
:empty_repo
)
}
end
it_behaves_like
'boards list service'
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