BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b0600b01
Commit
b0600b01
authored
Aug 09, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a spec for new_group_member
parent
b5809822
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
notification_service_spec.rb
spec/services/notification_service_spec.rb
+30
-0
No files found.
spec/services/notification_service_spec.rb
View file @
b0600b01
...
...
@@ -472,6 +472,36 @@ describe NotificationService, :mailer do
end
end
describe
'Members'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:added_user
)
{
create
(
:user
)
}
def
create_member!
GroupMember
.
create
(
group:
group
,
user:
added_user
,
access_level:
Gitlab
::
Access
::
GUEST
)
end
it
'sends a notification'
do
create_member!
should_only_email
(
added_user
)
end
describe
'when notifications are disabled'
do
before
do
create_global_setting_for
(
added_user
,
:disabled
)
end
it
'does not send a notification'
do
create_member!
should_not_email_anyone
end
end
end
describe
'Issues'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
...
...
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