Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5dd28621
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5dd28621
编写于
11月 09, 2017
作者:
F
Felipe Artur
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix image diff notes email
上级
1bf68956
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
32 addition
and
4 deletion
+32
-4
app/views/notify/_note_email.html.haml
app/views/notify/_note_email.html.haml
+8
-3
changelogs/unreleased/issue_39238.yml
changelogs/unreleased/issue_39238.yml
+5
-0
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+19
-1
未找到文件。
app/views/notify/_note_email.html.haml
浏览文件 @
5dd28621
-
discussion
=
@note
.
discussion
if
@note
.
part_of_discussion?
-
diff_discussion
=
discussion
&
.
diff_discussion?
-
on_image
=
discussion
.
on_image?
if
diff_discussion
-
if
discussion
-
phrase_end_char
=
on_image
?
"."
:
":"
%p
.details
=
succeed
':'
do
=
succeed
phrase_end_char
do
=
link_to
@note
.
author_name
,
user_url
(
@note
.
author
)
-
if
di
scussion
.
diff_discussion?
-
if
di
ff_discussion
-
if
discussion
.
new_discussion?
started a new discussion
-
else
...
...
@@ -21,7 +26,7 @@
%p
.details
#{
link_to
@note
.
author_name
,
user_url
(
@note
.
author
)
}
commented:
-
if
di
scussion
&
.
diff_discussion?
-
if
di
ff_discussion
&&
!
on_image
=
content_for
:head
do
=
stylesheet_link_tag
'mailers/highlighted_diff_email'
...
...
changelogs/unreleased/issue_39238.yml
0 → 100644
浏览文件 @
5dd28621
---
title
:
Fix image diff notification email from showing wrong content
merge_request
:
author
:
type
:
fixed
spec/mailers/notify_spec.rb
浏览文件 @
5dd28621
...
...
@@ -783,7 +783,25 @@ describe Notify do
shared_examples
'an email for a note on a diff discussion'
do
|
model
|
let
(
:note
)
{
create
(
model
,
author:
note_author
)
}
it
"includes diffs with character-level highlighting"
do
context
'when note is on image'
do
before
do
allow_any_instance_of
(
DiffDiscussion
).
to
receive
(
:on_image?
).
and_return
(
true
)
end
it
'does not include diffs with character-level highlighting'
do
is_expected
.
not_to
have_body_text
'<span class="p">}</span></span>'
end
it
'ends the intro with a dot'
do
is_expected
.
to
have_body_text
"
#{
note
.
diff_file
.
file_path
}
</a>."
end
end
it
'ends the intro with a colon'
do
is_expected
.
to
have_body_text
"
#{
note
.
diff_file
.
file_path
}
</a>:"
end
it
'includes diffs with character-level highlighting'
do
is_expected
.
to
have_body_text
'<span class="p">}</span></span>'
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录