Commit 1af65c96c952fd7b02b24cae34e526d7dd7b5950
1 parent
845b98ec
Exists in
master
and in
4 other branches
Avoid duplicate group membership emails
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
app/observers/users_group_observer.rb
spec/observers/users_group_observer_spec.rb
... | ... | @@ -23,5 +23,10 @@ describe UsersGroupObserver do |
23 | 23 | subject.should_receive(:notification) |
24 | 24 | @membership.update_attribute(:group_access, UsersGroup::MASTER) |
25 | 25 | end |
26 | + | |
27 | + it "does not send an email when the access level has not changed" do | |
28 | + subject.should_not_receive(:notification) | |
29 | + @membership.update_attribute(:group_access, UsersGroup::OWNER) | |
30 | + end | |
26 | 31 | end |
27 | 32 | end | ... | ... |