summaryrefslogtreecommitdiff
path: root/spec/mailers/emails
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mailers/emails')
-rw-r--r--spec/mailers/emails/projects_spec.rb6
-rw-r--r--spec/mailers/emails/releases_spec.rb9
2 files changed, 11 insertions, 4 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