Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-12-06 16:20:35 +0400
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-12-09 12:22:59 +0400
commit1af65c96c952fd7b02b24cae34e526d7dd7b5950 (patch)
tree863f7ef22016d9c32a7e45bd18343103383b8d08 /spec
parent845b98ec2b72e7c59167e9a06c22561c42a920d6 (diff)
Avoid duplicate group membership emails
Diffstat (limited to 'spec')
-rw-r--r--spec/observers/users_group_observer_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/observers/users_group_observer_spec.rb b/spec/observers/users_group_observer_spec.rb
index 3bf562edbb7..65484806b19 100644
--- a/spec/observers/users_group_observer_spec.rb
+++ b/spec/observers/users_group_observer_spec.rb
@@ -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