diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-16 18:07:36 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-16 18:07:36 +0300 |
commit | afe44451f46e2c470f429b0b6f73e04d49e66f7c (patch) | |
tree | 2388a3f85355ca180d2256f9c9299b5bf2dda059 /spec/mailers | |
parent | 5c4934ee9486fb5ce7f14581680369010009835b (diff) | |
parent | a73f480715f086e86d781e22d8a76b71c3b0680a (diff) |
[ci skip]ce-6038-rebase-preserve-merge
Merge remote-tracking branch 'upstream/master' into ce-6038-rebase-preserve-merge
* upstream/master: (173 commits)
Fix invalid link to GitLab.com architecture.md
i18n: externalize strings from 'app/views/import'
Remove Repository#lookup and unreachable rugged code
refactor code based on feedback
Trigger rails5 tests either by variable or ref name
Fix link in help doc which was linking to old mono-repo, now in its own repo
Allow Danger step to fail
update webpack to v4.16
Backport logger changes from EE
Add the CI Job trigger as the build trigger
Remove flaky and redundant expectations
use fileuploader dynamic path method in uploads manager and add spec
fix typo in uploads manager
add small comment to download method in uploads manager
refactor uploads manager
Update 10.6-to-10.7.md
Lazy-load performance bar UI
Update .gitlab-ci.yml
fixed test to correctly text relative URLs doesnt add query param if source & target projects match
Add changelog entry
...
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/notify_spec.rb | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index a9a45367b4a..581132b6672 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -314,6 +314,17 @@ describe Notify do end end + describe 'that are new with a description' do + subject { described_class.new_merge_request_email(merge_request.assignee_id, merge_request.id) } + + it_behaves_like 'it should show Gmail Actions View Merge request link' + it_behaves_like "an unsubscribeable thread" + + it 'contains the description' do + is_expected.to have_body_text(merge_request.description) + end + end + describe 'that have been relabeled' do subject { described_class.relabeled_merge_request_email(recipient.id, merge_request.id, %w[foo bar baz], current_user.id) } @@ -541,7 +552,7 @@ describe Notify do describe 'project access requested' do let(:project) do create(:project, :public, :access_requestable) do |project| - project.add_master(project.owner) + project.add_maintainer(project.owner) end end @@ -616,8 +627,8 @@ describe Notify do end describe 'project invitation' do - let(:master) { create(:user).tap { |u| project.add_master(u) } } - let(:project_member) { invite_to_project(project, inviter: master) } + let(:maintainer) { create(:user).tap { |u| project.add_maintainer(u) } } + let(:project_member) { invite_to_project(project, inviter: maintainer) } subject { described_class.member_invited_email('project', project_member.id, project_member.invite_token) } @@ -636,9 +647,9 @@ describe Notify do describe 'project invitation accepted' do let(:invited_user) { create(:user, name: 'invited user') } - let(:master) { create(:user).tap { |u| project.add_master(u) } } + let(:maintainer) { create(:user).tap { |u| project.add_maintainer(u) } } let(:project_member) do - invitee = invite_to_project(project, inviter: master) + invitee = invite_to_project(project, inviter: maintainer) invitee.accept_invite!(invited_user) invitee end @@ -659,14 +670,14 @@ describe Notify do end describe 'project invitation declined' do - let(:master) { create(:user).tap { |u| project.add_master(u) } } + let(:maintainer) { create(:user).tap { |u| project.add_maintainer(u) } } let(:project_member) do - invitee = invite_to_project(project, inviter: master) + invitee = invite_to_project(project, inviter: maintainer) invitee.decline_invite! invitee end - subject { described_class.member_invite_declined_email('project', project.id, project_member.invite_email, master.id) } + subject { described_class.member_invite_declined_email('project', project.id, project_member.invite_email, maintainer.id) } it_behaves_like 'an email sent from GitLab' it_behaves_like 'it should not have Gmail Actions links' |