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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
a08a26ac
Commit
a08a26ac
authored
Jun 17, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't send the "access declined" email on access request withdrawal
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
724f986f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
app/services/members/destroy_service.rb
app/services/members/destroy_service.rb
+3
-1
spec/services/members/destroy_service_spec.rb
spec/services/members/destroy_service_spec.rb
+8
-0
No files found.
app/services/members/destroy_service.rb
View file @
a08a26ac
...
@@ -10,7 +10,9 @@ module Members
...
@@ -10,7 +10,9 @@ module Members
if
can?
(
current_user
,
"destroy_
#{
member
.
type
.
underscore
}
"
.
to_sym
,
member
)
if
can?
(
current_user
,
"destroy_
#{
member
.
type
.
underscore
}
"
.
to_sym
,
member
)
member
.
destroy
member
.
destroy
notification_service
.
decline_access_request
(
member
)
if
member
.
request?
if
member
.
request?
&&
member
.
user
!=
current_user
notification_service
.
decline_access_request
(
member
)
end
end
end
member
member
...
...
spec/services/members/destroy_service_spec.rb
View file @
a08a26ac
...
@@ -34,6 +34,14 @@ describe Members::DestroyService, services: true do
...
@@ -34,6 +34,14 @@ describe Members::DestroyService, services: true do
destroy_member
(
member
,
user
)
destroy_member
(
member
,
user
)
end
end
context
'when current user is the member'
do
it
'does not call Member#after_decline_request'
do
expect_any_instance_of
(
NotificationService
).
not_to
receive
(
:decline_access_request
).
with
(
member
)
destroy_member
(
member
,
member
.
user
)
end
end
end
end
end
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