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
e0b9fa32
Commit
e0b9fa32
authored
Apr 20, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Multiple issue assignees] fix specs
parent
dc6e65da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
app/models/concerns/milestoneish.rb
app/models/concerns/milestoneish.rb
+1
-1
spec/features/unsubscribe_links_spec.rb
spec/features/unsubscribe_links_spec.rb
+1
-1
spec/services/merge_requests/assign_issues_service_spec.rb
spec/services/merge_requests/assign_issues_service_spec.rb
+4
-4
No files found.
app/models/concerns/milestoneish.rb
View file @
e0b9fa32
...
...
@@ -40,7 +40,7 @@ module Milestoneish
def
issues_visible_to_user
(
user
)
memoize_per_user
(
user
,
:issues_visible_to_user
)
do
IssuesFinder
.
new
(
user
,
issues_finder_params
)
.
execute
.
where
(
milestone_id:
milestoneish_ids
)
.
execute
.
includes
(
:assignees
).
where
(
milestone_id:
milestoneish_ids
)
end
end
...
...
spec/features/unsubscribe_links_spec.rb
View file @
e0b9fa32
...
...
@@ -6,7 +6,7 @@ describe 'Unsubscribe links', feature: true do
let
(
:recipient
)
{
create
(
:user
)
}
let
(
:author
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:params
)
{
{
title:
'A bug!'
,
description:
'Fix it!'
,
assignee
:
recipient
}
}
let
(
:params
)
{
{
title:
'A bug!'
,
description:
'Fix it!'
,
assignee
s:
[
recipient
]
}
}
let
(
:issue
)
{
Issues
::
CreateService
.
new
(
project
,
author
,
params
).
execute
}
let
(
:mail
)
{
ActionMailer
::
Base
.
deliveries
.
last
}
...
...
spec/services/merge_requests/assign_issues_service_spec.rb
View file @
e0b9fa32
...
...
@@ -21,11 +21,11 @@ describe MergeRequests::AssignIssuesService, services: true do
expect
(
service
.
assignable_issues
).
to
be_empty
end
it
'ignores issues already assigned to any user'
do
issue
.
assignees
=
[
create
(
:user
)]
it
'ignores issues already assigned to any user'
do
issue
.
assignees
=
[
create
(
:user
)]
expect
(
service
.
assignable_issues
).
to
be_empty
end
expect
(
service
.
assignable_issues
).
to
be_empty
end
it
'ignores all issues unless current_user is merge_request.author'
do
merge_request
.
update!
(
author:
create
(
:user
))
...
...
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