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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 14:59:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 14:59:07 +0300
commit8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch)
tree544930fb309b30317ae9797a9683768705d664c4 /spec/mailers
parent4b1de649d0168371549608993deac953eb692019 (diff)
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/emails/projects_spec.rb6
-rw-r--r--spec/mailers/emails/releases_spec.rb9
-rw-r--r--spec/mailers/notify_spec.rb34
3 files changed, 12 insertions, 37 deletions
diff --git a/spec/mailers/emails/projects_spec.rb b/spec/mailers/emails/projects_spec.rb
index 6c23625d4a3..a1f19a972f1 100644
--- a/spec/mailers/emails/projects_spec.rb
+++ b/spec/mailers/emails/projects_spec.rb
@@ -19,11 +19,9 @@ RSpec.describe Emails::Projects do
create(:project_incident_management_setting, project: project, create_issue: true)
end
- let(:incident_issues_url) do
- project_issues_url(project, label_name: 'incident')
- end
+ let(:incidents_url) { project_incidents_url(project) }
- it { is_expected.to have_body_text(incident_issues_url) }
+ it { is_expected.to have_body_text(incidents_url) }
end
end
diff --git a/spec/mailers/emails/releases_spec.rb b/spec/mailers/emails/releases_spec.rb
index 60e522c7cfa..6ee87724c83 100644
--- a/spec/mailers/emails/releases_spec.rb
+++ b/spec/mailers/emails/releases_spec.rb
@@ -49,5 +49,14 @@ RSpec.describe Emails::Releases do
is_expected.to have_body_text('Release notes:')
is_expected.to have_body_text(release.description)
end
+
+ context 'release notes with attachment' do
+ let(:upload_path) { '/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg' }
+ let(:release) { create(:release, project: project, description: "Attachment: [Test file](#{upload_path})") }
+
+ it 'renders absolute links' do
+ is_expected.to have_body_text(%Q(<a href="#{project.web_url}#{upload_path}" data-link="true" class="gfm">Test file</a>))
+ end
+ end
end
end
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 3cc5f202b1f..3ebc2fc1e36 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -1284,7 +1284,7 @@ RSpec.describe Notify do
context 'for service desk issues' do
before do
- issue.update!(service_desk_reply_to: 'service.desk@example.com')
+ issue.update!(external_author: 'service.desk@example.com')
end
def expect_sender(username)
@@ -1450,38 +1450,6 @@ RSpec.describe Notify do
subject { described_class.member_invited_email('Group', group_member.id, group_member.invite_token) }
- shared_examples "tracks the 'sent' event for the invitation reminders experiment" do
- before do
- stub_experiment(invitation_reminders: true)
- allow(Gitlab::Experimentation).to receive(:enabled_for_attribute?).with(:invitation_reminders, group_member.invite_email).and_return(experimental_group)
- end
-
- it "tracks the 'sent' event", :snowplow do
- subject.deliver_now
-
- expect_snowplow_event(
- category: 'Growth::Acquisition::Experiment::InvitationReminders',
- label: Digest::MD5.hexdigest(group_member.to_global_id.to_s),
- property: experimental_group ? 'experimental_group' : 'control_group',
- action: 'sent'
- )
- end
- end
-
- describe 'tracking for the invitation reminders experiment' do
- context 'when invite email is in the experimental group' do
- let(:experimental_group) { true }
-
- it_behaves_like "tracks the 'sent' event for the invitation reminders experiment"
- end
-
- context 'when invite email is in the control group' do
- let(:experimental_group) { false }
-
- it_behaves_like "tracks the 'sent' event for the invitation reminders experiment"
- end
- end
-
it_behaves_like 'an email sent from GitLab'
it_behaves_like 'it should not have Gmail Actions links'
it_behaves_like "a user cannot unsubscribe through footer link"