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
859423f5
Commit
859423f5
authored
Sep 03, 2020
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce some user creation calls in notification_service_spec
parent
64edf6ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+5
-4
No files found.
spec/services/notification_service_spec.rb
View file @
859423f5
...
...
@@ -8,9 +8,9 @@ RSpec.describe NotificationService, :mailer do
include
NotificationHelpers
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
:public
)
}
let_it_be_with_refind
(
:assignee
)
{
create
(
:user
)
}
let
(
:notification
)
{
described_class
.
new
}
let
(
:assignee
)
{
create
(
:user
)
}
around
(
:example
,
:deliver_mails_inline
)
do
|
example
|
# This is a temporary `around` hook until all the examples check the
...
...
@@ -1585,20 +1585,21 @@ RSpec.describe NotificationService, :mailer do
describe
'Merge Requests'
,
:deliver_mails_inline
do
let
(
:another_project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:assignees
)
{
Array
.
wrap
(
assignee
)
}
let
(
:author
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
:merge_request
,
author:
author
,
source_project:
project
,
assignees:
assignees
,
description:
'cc @participant'
}
let_it_be_with_reload
(
:author
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
,
:repository
,
namespace:
group
)
}
before_all
do
build_team
(
project
)
add_users
(
project
)
project
.
add_maintainer
(
author
)
project
.
add_maintainer
(
assignee
)
end
before
do
project
.
add_maintainer
(
author
)
assignees
.
each
{
|
assignee
|
project
.
add_maintainer
(
assignee
)
}
add_user_subscriptions
(
merge_request
)
update_custom_notification
(
:new_merge_request
,
@u_guest_custom
,
resource:
project
)
update_custom_notification
(
:new_merge_request
,
@u_custom_global
)
...
...
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