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
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/members/group_member_spec.rb')
-rw-r--r--spec/models/members/group_member_spec.rb46
1 files changed, 0 insertions, 46 deletions
diff --git a/spec/models/members/group_member_spec.rb b/spec/models/members/group_member_spec.rb
deleted file mode 100644
index e206c11f33a..00000000000
--- a/spec/models/members/group_member_spec.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# == Schema Information
-#
-# Table name: members
-#
-# id :integer not null, primary key
-# access_level :integer not null
-# source_id :integer not null
-# source_type :string(255) not null
-# user_id :integer not null
-# notification_level :integer not null
-# type :string(255)
-# created_at :datetime
-# updated_at :datetime
-#
-
-require 'spec_helper'
-
-describe GroupMember do
- context 'notification' do
- describe "#after_create" do
- it "should send email to user" do
- membership = build(:group_member)
- membership.stub(notification_service: double('NotificationService').as_null_object)
- expect(membership).to receive(:notification_service)
- membership.save
- end
- end
-
- describe "#after_update" do
- before do
- @group_member = create :group_member
- @group_member.stub(notification_service: double('NotificationService').as_null_object)
- end
-
- it "should send email to user" do
- expect(@group_member).to receive(:notification_service)
- @group_member.update_attribute(:access_level, GroupMember::MASTER)
- end
-
- it "does not send an email when the access level has not changed" do
- expect(@group_member).not_to receive(:notification_service)
- @group_member.update_attribute(:access_level, GroupMember::OWNER)
- end
- end
- end
-end