diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-17 21:36:40 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-17 21:36:40 +0300 |
| commit | 9e3094b232fe5343e5986f0e6a072a5194e18ada (patch) | |
| tree | 4fa066af51eeadebdbe265da221347f9430c01d1 /spec/observers | |
| parent | b3a90aba41a040378530cb9f1980497e16bbdb11 (diff) | |
| download | gitlab-ce-9e3094b232fe5343e5986f0e6a072a5194e18ada.tar.gz | |
Remove UsersGroup observer
Diffstat (limited to 'spec/observers')
| -rw-r--r-- | spec/observers/users_group_observer_spec.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/observers/users_group_observer_spec.rb b/spec/observers/users_group_observer_spec.rb deleted file mode 100644 index 2ab99c33b78..00000000000 --- a/spec/observers/users_group_observer_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'spec_helper' - -describe UsersGroupObserver do - before(:each) { enable_observers } - after(:each) { disable_observers } - - subject { UsersGroupObserver.instance } - before { subject.stub(notification: double('NotificationService').as_null_object) } - - describe "#after_create" do - it "should send email to user" do - subject.should_receive(:notification) - create(:users_group) - end - end - - describe "#after_update" do - before do - @membership = create :users_group - end - - it "should send email to user" 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 |
