diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-17 14:06:55 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-18 05:46:45 +0200 |
commit | 4652489f40a4ff2b749f9ad495986a7a17448243 (patch) | |
tree | 90a373da8bdbaf66bc0228abf8465d9d928c9f2e /spec/models/member_spec.rb | |
parent | 00906b5bb6cde8cb60281109060a519a54000c61 (diff) | |
download | gitlab-ce-4652489f40a4ff2b749f9ad495986a7a17448243.tar.gz |
New Members::DestroyService
This is to ensure we don't send unwanted notifications when deleting a
project. In other words, stop abusing AR callbacks and use services.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models/member_spec.rb')
-rw-r--r-- | spec/models/member_spec.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/spec/models/member_spec.rb b/spec/models/member_spec.rb index 3ed3202ac6c..e9134a3d283 100644 --- a/spec/models/member_spec.rb +++ b/spec/models/member_spec.rb @@ -134,18 +134,6 @@ describe Member, models: true do it { is_expected.to respond_to(:user_email) } end - describe 'Callbacks' do - describe 'after_destroy :post_decline_request, if: :request?' do - let(:member) { create(:project_member, requested_at: Time.now.utc) } - - it 'calls #post_decline_request' do - expect(member).to receive(:post_decline_request) - - member.destroy - end - end - end - describe ".add_user" do let!(:user) { create(:user) } let(:project) { create(:project) } |