summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/mailers/notify_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index e822d7eb348..59566cb4bf5 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -488,7 +488,8 @@ describe Notify do
end
describe 'project access changed' do
- let(:project) { create(:empty_project, :public, :access_requestable) }
+ let(:owner) { create(:user, name: "Chang O'Keefe") }
+ let(:project) { create(:empty_project, :public, :access_requestable, namespace: owner.namespace) }
let(:user) { create(:user) }
let(:project_member) { create(:project_member, project: project, user: user) }
subject { Notify.member_access_granted_email('project', project_member.id) }
@@ -503,6 +504,10 @@ describe Notify do
is_expected.to have_body_text project.web_url
is_expected.to have_body_text project_member.human_access
end
+
+ it 'HTML-escaping project.name_with_namespace works...' do
+ is_expected.to have_body_text ERB::Util.html_escape(project.name_with_namespace)
+ end
end
def invite_to_project(project, inviter:)