diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-13 16:16:51 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-15 13:49:41 +0100 |
commit | 99f995755ef4b445216dd7baae35f5a4846ef30c (patch) | |
tree | 1fdbd02c7cffc2f21faefaa80dea43f6cebecb0a /spec | |
parent | 60df262c38d7c235b483cc1c4beb12f793e0e58a (diff) | |
download | gitlab-ce-99f995755ef4b445216dd7baae35f5a4846ef30c.tar.gz |
Use `group_member` instead of `users_group` or `membership`.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/members/group_member_spec.rb | 12 | ||||
-rw-r--r-- | spec/services/notification_service_spec.rb | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/spec/models/members/group_member_spec.rb b/spec/models/members/group_member_spec.rb index e04f1741b24..e206c11f33a 100644 --- a/spec/models/members/group_member_spec.rb +++ b/spec/models/members/group_member_spec.rb @@ -28,18 +28,18 @@ describe GroupMember do describe "#after_update" do before do - @membership = create :group_member - @membership.stub(notification_service: double('NotificationService').as_null_object) + @group_member = create :group_member + @group_member.stub(notification_service: double('NotificationService').as_null_object) end it "should send email to user" do - expect(@membership).to receive(:notification_service) - @membership.update_attribute(:access_level, GroupMember::MASTER) + 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(@membership).not_to receive(:notification_service) - @membership.update_attribute(:access_level, GroupMember::OWNER) + expect(@group_member).not_to receive(:notification_service) + @group_member.update_attribute(:access_level, GroupMember::OWNER) end end end diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 2074f8e7f78..34737348d41 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -69,9 +69,9 @@ describe NotificationService do user_project = note.project.project_members.find_by_user_id(@u_watcher.id) user_project.notification_level = Notification::N_PARTICIPATING user_project.save - user_group = note.project.group.group_members.find_by_user_id(@u_watcher.id) - user_group.notification_level = Notification::N_GLOBAL - user_group.save + group_member = note.project.group.group_members.find_by_user_id(@u_watcher.id) + group_member.notification_level = Notification::N_GLOBAL + group_member.save end it do |