Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set user names in mailers spec #4576

merged 1 commit into from Sep 4, 2019


Copy link

commented Sep 4, 2019

I noticed while looking into #4538 the following test failure:

1) CompetitionsMailer wrc_delegate_report_followup renders the body
     Failure/Error: expect(mail.body.encoded).to match(
       expected "<html>\r\n  <head>\r\n    <link rel=\"stylesheet\" media=\"screen\" href=\"/assets/email-e7fc621ffe6...r>\r\n  馃 Your friendly neighborhood WRC automation script.\r\n</p>\r\n\r\n  </body>\r\n</html>\r\n" to match "Johnny O'Connell"
       @@ -1,2 +1,34 @@
       -Johnny O'Connell
       +  <span style="font-weight: bold">Secondary for this thread is: Johnny O&#39;Connell</span><br>
       +  Please respond if the primary hasn't had a chance to handle this thread within 24 hours.

In mailers names containing quotes are encoded into html entities, therefore the match fails.
There are several workaround:

Since it's relevant only to mailers spec, I went with the third option.

Copy link

left a comment



This comment has been minimized.

Copy link
Member Author

commented Sep 4, 2019

Thanks for the fast review @jonatanklosko!

@viroulep viroulep merged commit 31f7964 into thewca:master Sep 4, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.04%) to 95.962%

@viroulep viroulep deleted the viroulep:avoid-random-names branch Sep 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can鈥檛 perform that action at this time.