diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-19 13:44:20 +0300 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-19 14:18:13 +0300 |
commit | 681f9aca39101109edb3b46a14282b007d68e69b (patch) | |
tree | 9666c79216a5583c0b9dab2b1eb561402af89621 /spec/services/notification_service_spec.rb | |
parent | 12fe6a6fd733110acc72aa0f5bdaec2b1fa1f358 (diff) |
Fix notification_service argument error of declined invitation emails
Removing unused access_level parameter.
Bug introduced here -> 6d103a2f4764441b1650ba6d790732056c9a8516
access_level parameter wasn’t needed since -> 88c2639356e6e4b4b05d96584768e07a9ce4b048
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r-- | spec/services/notification_service_spec.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 18da3b1b453..f81a58899fd 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -1113,6 +1113,46 @@ describe NotificationService, services: true do end end + describe 'GroupMember' do + describe '#decline_group_invite' do + let(:creator) { create(:user) } + let(:group) { create(:group) } + let(:member) { create(:user) } + + before(:each) do + group.add_owner(creator) + group.add_developer(member, creator) + end + + it do + group_member = group.members.first + + expect do + notification.decline_group_invite(group_member) + end.to change { ActionMailer::Base.deliveries.size }.by(1) + end + end + end + + describe 'ProjectMember' do + describe '#decline_group_invite' do + let(:project) { create(:project) } + let(:member) { create(:user) } + + before(:each) do + project.team << [member, :developer, project.owner] + end + + it do + project_member = project.members.first + + expect do + notification.decline_project_invite(project_member) + end.to change { ActionMailer::Base.deliveries.size }.by(1) + end + end + end + def build_team(project) @u_watcher = create_global_setting_for(create(:user), :watch) @u_participating = create_global_setting_for(create(:user), :participating) |