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
aaf65553
Commit
aaf65553
authored
Mar 28, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve additional conflicts
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
3276ef44
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
47 deletions
+22
-47
app/services/boards/create_service.rb
app/services/boards/create_service.rb
+1
-9
spec/services/boards/issues/list_service_spec.rb
spec/services/boards/issues/list_service_spec.rb
+19
-18
spec/services/boards/issues/move_service_spec.rb
spec/services/boards/issues/move_service_spec.rb
+0
-4
spec/services/boards/lists/move_service_spec.rb
spec/services/boards/lists/move_service_spec.rb
+0
-4
spec/services/merge_requests/refresh_service_spec.rb
spec/services/merge_requests/refresh_service_spec.rb
+1
-5
spec/services/test_hook_service_spec.rb
spec/services/test_hook_service_spec.rb
+1
-7
No files found.
app/services/boards/create_service.rb
View file @
aaf65553
...
...
@@ -3,17 +3,9 @@ module Boards
def
execute
board
=
project
.
boards
.
create
(
params
)
<<<<<<<
HEAD
if
board
.
persisted?
board
.
lists
.
create
(
list_type: :
done
)
board
.
lists
.
create
(
list_type: :
closed
)
end
=======
private
def
create_board!
board
=
project
.
boards
.
create
board
.
lists
.
create
(
list_type: :closed
)
>>>>>>>
ce
/
master
board
end
...
...
spec/services/boards/issues/list_service_spec.rb
View file @
aaf65553
...
...
@@ -18,11 +18,7 @@ describe Boards::Issues::ListService, services: true do
let!
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
0
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
testing
,
position:
1
)
}
<<<<<<<
HEAD
let!
(
:done
)
{
board
.
done_list
}
=======
let!
(
:closed
)
{
create
(
:closed_list
,
board:
board
)
}
>>>>>>>
ce
/
master
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
])
}
...
...
@@ -62,15 +58,10 @@ describe Boards::Issues::ListService, services: true do
end
end
<<<<<<<
HEAD
context
'when board have a milestone'
do
it
'returns opened issues without board labels and milestone applied'
do
params
=
{
board_id:
board
.
id
}
board
.
update_attribute
(
:milestone
,
m1
)
=======
it
'returns closed issues when listing issues from Closed'
do
params
=
{
board_id:
board
.
id
,
id:
closed
.
id
}
>>>>>>>
ce
/
master
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
...
...
@@ -79,20 +70,30 @@ describe Boards::Issues::ListService, services: true do
end
end
it
'returns closed issues when listing issues from Done'
do
params
=
{
board_id:
board
.
id
,
id:
done
.
id
}
context
'issues are ordered by priority'
do
it
'returns opened issues when list_id is missing'
do
params
=
{
board_id:
board
.
id
}
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
expect
(
issues
).
to
eq
[
closed_issue4
,
closed_issue2
,
closed_issue5
,
closed_issue3
,
clos
ed_issue1
]
end
expect
(
issues
).
to
eq
[
opened_issue2
,
reopened_issue1
,
open
ed_issue1
]
end
it
'returns opened issues that have label list applied when listing issues from a label list'
do
params
=
{
board_id:
board
.
id
,
id:
list1
.
id
}
it
'returns closed issues when listing issues from Closed'
do
params
=
{
board_id:
board
.
id
,
id:
closed
.
id
}
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
expect
(
issues
).
to
eq
[
closed_issue4
,
closed_issue2
,
closed_issue5
,
closed_issue3
,
closed_issue1
]
end
it
'returns opened issues that have label list applied when listing issues from a label list'
do
params
=
{
board_id:
board
.
id
,
id:
list1
.
id
}
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
expect
(
issues
).
to
eq
[
list1_issue3
,
list1_issue1
,
list1_issue2
]
expect
(
issues
).
to
eq
[
list1_issue3
,
list1_issue1
,
list1_issue2
]
end
end
context
'with list that does not belong to the board'
do
...
...
spec/services/boards/issues/move_service_spec.rb
View file @
aaf65553
...
...
@@ -12,11 +12,7 @@ describe Boards::Issues::MoveService, services: true do
let!
(
:list1
)
{
create
(
:list
,
board:
board1
,
label:
development
,
position:
0
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
board1
,
label:
testing
,
position:
1
)
}
<<<<<<<
HEAD
let!
(
:done
)
{
board1
.
done_list
}
=======
let!
(
:closed
)
{
create
(
:closed_list
,
board:
board1
)
}
>>>>>>>
ce
/
master
before
do
project
.
team
<<
[
user
,
:developer
]
...
...
spec/services/boards/lists/move_service_spec.rb
View file @
aaf65553
...
...
@@ -10,11 +10,7 @@ describe Boards::Lists::MoveService, services: true do
let!
(
:development
)
{
create
(
:list
,
board:
board
,
position:
1
)
}
let!
(
:review
)
{
create
(
:list
,
board:
board
,
position:
2
)
}
let!
(
:staging
)
{
create
(
:list
,
board:
board
,
position:
3
)
}
<<<<<<<
HEAD
let!
(
:done
)
{
board
.
done_list
}
=======
let!
(
:closed
)
{
create
(
:closed_list
,
board:
board
)
}
>>>>>>>
ce
/
master
context
'when list type is set to label'
do
it
'keeps position of lists when new position is nil'
do
...
...
spec/services/merge_requests/refresh_service_spec.rb
View file @
aaf65553
...
...
@@ -11,11 +11,7 @@ describe MergeRequests::RefreshService, services: true do
group
=
create
(
:group
)
group
.
add_owner
(
@user
)
<<<<<<<
HEAD
@project
=
create
(
:project
,
namespace:
group
,
approvals_before_merge:
1
,
reset_approvals_on_push:
true
)
=======
@project
=
create
(
:project
,
:repository
,
namespace:
group
)
>>>>>>>
ce
/
master
@project
=
create
(
:project
,
:repository
,
namespace:
group
,
approvals_before_merge:
1
,
reset_approvals_on_push:
true
)
@fork_project
=
Projects
::
ForkService
.
new
(
@project
,
@user
).
execute
# The call to project.repository.after_import in RepositoryForkWorker does
# not reset the @exists variable of @fork_project.repository so we have to
...
...
spec/services/test_hook_service_spec.rb
View file @
aaf65553
require
'spec_helper'
describe
TestHookService
,
services:
true
do
<<<<<<<
HEAD
let
(
:user
)
{
create
:user
}
let
(
:group
)
{
create
:group
}
let
(
:project
)
{
create
:project
,
group:
group
}
let
(
:project
)
{
create
:project
,
:repository
,
group:
group
}
let
(
:project_hook
)
{
create
:project_hook
,
project:
project
}
let
(
:group_hook
)
{
create
:group_hook
,
group:
group
}
=======
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:hook
)
{
create
(
:project_hook
,
project:
project
)
}
>>>>>>>
ce
/
master
describe
'#execute'
do
it
"successfully executes the project hook"
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