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
9cedb3f8
Commit
9cedb3f8
authored
Jan 22, 2019
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port over fixes
From dev.gitlab repo
parent
df3fe91a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
ee/spec/models/merge_request_spec.rb
ee/spec/models/merge_request_spec.rb
+5
-5
ee/spec/services/ee/notification_service_spec.rb
ee/spec/services/ee/notification_service_spec.rb
+2
-0
ee/spec/services/merge_requests/update_service_spec.rb
ee/spec/services/merge_requests/update_service_spec.rb
+5
-0
No files found.
ee/spec/models/merge_request_spec.rb
View file @
9cedb3f8
...
...
@@ -536,8 +536,8 @@ describe MergeRequest do
it
"returns correct value"
do
user
=
create
(
:user
)
user1
=
create
(
:user
)
merge_request
.
approvers
.
create
(
user_id:
user
.
id
)
merge_request
.
approvers
.
create
(
user_id:
user1
.
id
)
create
(
:approver
,
target:
merge_request
,
user:
user
)
create
(
:approver
,
target:
merge_request
,
user:
user1
)
merge_request
.
approvals
.
create
(
user_id:
user1
.
id
)
expect
(
merge_request
.
approvers_left
).
to
eq
[
user
]
...
...
@@ -550,9 +550,9 @@ describe MergeRequest do
group
=
create
(
:group
)
group
.
add_developer
(
user2
)
merge_request
.
approver_groups
.
create
(
group:
group
)
merge_request
.
approvers
.
create
(
user_id:
user
.
id
)
merge_request
.
approvers
.
create
(
user_id:
user1
.
id
)
create
(
:approver_group
,
target:
merge_request
,
group:
group
)
create
(
:approver
,
target:
merge_request
,
user:
user
)
create
(
:approver
,
target:
merge_request
,
user:
user1
)
merge_request
.
approvals
.
create
(
user_id:
user1
.
id
)
expect
(
merge_request
.
approvers_left
).
to
match_array
[
user
,
user2
]
...
...
ee/spec/services/ee/notification_service_spec.rb
View file @
9cedb3f8
...
...
@@ -543,6 +543,7 @@ describe EE::NotificationService, :mailer do
before
do
merge_request
.
target_project
.
update
(
approvals_before_merge:
1
)
project_approvers
.
each
{
|
approver
|
create
(
:approver
,
user:
approver
,
target:
merge_request
.
target_project
)
}
reset_delivered_emails!
end
it
'emails the approvers'
do
...
...
@@ -563,6 +564,7 @@ describe EE::NotificationService, :mailer do
before
do
mr_approvers
.
each
{
|
approver
|
create
(
:approver
,
user:
approver
,
target:
merge_request
)
}
reset_delivered_emails!
end
it
'emails the MR approvers'
do
...
...
ee/spec/services/merge_requests/update_service_spec.rb
View file @
9cedb3f8
...
...
@@ -124,6 +124,11 @@ describe MergeRequests::UpdateService, :mailer do
before
do
stub_feature_flags
(
approval_rule:
false
)
project
.
add_developer
(
existing_approver
)
project
.
add_developer
(
removed_approver
)
project
.
add_developer
(
new_approver
)
perform_enqueued_jobs
do
update_merge_request
(
approver_ids:
[
existing_approver
,
removed_approver
].
map
(
&
:id
).
join
(
','
))
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