##// END OF EJS Templates
notifications: adjusting how instance name is passed and fixing tests
lisaq -
r512:fafa37cf default
parent child Browse files
Show More
@@ -327,7 +327,8 b' class EmailNotificationModel(BaseModel):'
327 :return:
327 :return:
328 """
328 """
329 _kwargs = {
329 _kwargs = {
330 'instance_url': h.url('home', qualified=True)
330 'instance_url': h.url('home', qualified=True),
331 'rhodecode_instance_name': getattr(c, 'rhodecode_name', '')
331 }
332 }
332 _kwargs.update(kwargs)
333 _kwargs.update(kwargs)
333 return _kwargs
334 return _kwargs
@@ -88,8 +88,8 b''
88 <tr><td style="width:100%;padding:7px;background-color:#202020" valign="top">
88 <tr><td style="width:100%;padding:7px;background-color:#202020" valign="top">
89 <a style="width:100%;height:100%;display:block;color:#eeeeee;text-decoration:none;" href="${instance_url}">
89 <a style="width:100%;height:100%;display:block;color:#eeeeee;text-decoration:none;" href="${instance_url}">
90 ${_('RhodeCode')}
90 ${_('RhodeCode')}
91 % if c.rhodecode_name:
91 % if rhodecode_instance_name:
92 - ${c.rhodecode_name}
92 - ${rhodecode_instance_name}
93 % endif
93 % endif
94 </a>
94 </a>
95 </td></tr>
95 </td></tr>
@@ -27,9 +27,9 b' def test_render_email(pylonsapp):'
27 assert body_plaintext == 'Email Plaintext Body'
27 assert body_plaintext == 'Email Plaintext Body'
28
28
29 # body
29 # body
30 assert '<b>This is a notification ' \
30 assert 'This is a notification ' \
31 'from RhodeCode. http://test.example.com:80/</b>' in body
31 'from RhodeCode. http://test.example.com:80/' in body
32 assert '<b>Email Body' in body
32 assert 'Email Body' in body
33
33
34
34
35 def test_render_pr_email(pylonsapp, user_admin):
35 def test_render_pr_email(pylonsapp, user_admin):
General Comments 0
You need to be logged in to leave comments. Login now