Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
ff5dace7
Commit
ff5dace7
authored
Dec 20, 2018
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always use colon at end of discussion notification email headline
parent
34611f0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
17 deletions
+5
-17
app/views/notify/_note_email.html.haml
app/views/notify/_note_email.html.haml
+3
-7
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+2
-10
No files found.
app/views/notify/_note_email.html.haml
View file @
ff5dace7
...
...
@@ -4,17 +4,13 @@
-
note_style
=
local_assigns
.
fetch
(
:note_style
,
""
)
-
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
{
style:
"color: #777777;"
}
=
succeed
phrase_end_char
do
=
succeed
':'
do
=
link_to
note
.
author_name
,
user_url
(
note
.
author
)
-
if
di
ff_discussion
-
if
di
scussion
&
.
diff_discussion?
-
if
discussion
.
new_discussion?
started a new discussion
-
else
...
...
@@ -31,7 +27,7 @@
%p
.details
#{
link_to
note
.
author_name
,
user_url
(
note
.
author
)
}
commented:
-
if
di
ff_discussion
&&
!
on_image
-
if
di
scussion
&
.
diff_discussion?
&&
discussion
.
on_text?
=
content_for
:head
do
=
stylesheet_link_tag
'mailers/highlighted_diff_email'
...
...
spec/mailers/notify_spec.rb
View file @
ff5dace7
...
...
@@ -890,22 +890,14 @@ describe Notify do
shared_examples
'an email for a note on a diff discussion'
do
|
model
|
let
(
:note
)
{
create
(
model
,
author:
note_author
)
}
context
'when note is
on image
'
do
context
'when note is
not on text
'
do
before
do
allow_any_instance_of
(
DiffDiscussion
).
to
receive
(
:on_
image?
).
and_return
(
tru
e
)
allow_any_instance_of
(
DiffDiscussion
).
to
receive
(
:on_
text?
).
and_return
(
fals
e
)
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment