Skip to content
Snippets Groups Projects
Commit 74b72003 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'users_group_observer' of /home/git/repositories/gitlab/gitlabhq

parents 845b98ec 1af65c96
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment