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
Jérome Perrin
gitlab-ce
Commits
74b72003
Commit
74b72003
authored
Dec 09, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'users_group_observer' of /home/git/repositories/gitlab/gitlabhq
parents
845b98ec
1af65c96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
app/observers/users_group_observer.rb
app/observers/users_group_observer.rb
+1
-1
spec/observers/users_group_observer_spec.rb
spec/observers/users_group_observer_spec.rb
+5
-0
No files found.
app/observers/users_group_observer.rb
View file @
74b72003
...
...
@@ -4,6 +4,6 @@ class UsersGroupObserver < BaseObserver
end
def
after_update
(
membership
)
notification
.
update_group_member
(
membership
)
notification
.
update_group_member
(
membership
)
if
membership
.
group_access_changed?
end
end
spec/observers/users_group_observer_spec.rb
View file @
74b72003
...
...
@@ -23,5 +23,10 @@ describe UsersGroupObserver do
subject
.
should_receive
(
:notification
)
@membership
.
update_attribute
(
:group_access
,
UsersGroup
::
MASTER
)
end
it
"does not send an email when the access level has not changed"
do
subject
.
should_not_receive
(
:notification
)
@membership
.
update_attribute
(
:group_access
,
UsersGroup
::
OWNER
)
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