Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gigadoc 2
diaspora
Commits
451e6087
Commit
451e6087
authored
Jan 18, 2017
by
Benjamin Neff
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/0.6.3.0' into next-minor
parents
b508b9f6
4e6a9aeb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
app/helpers/notifier_helper.rb
app/helpers/notifier_helper.rb
+1
-1
spec/helpers/notifier_helper_spec.rb
spec/helpers/notifier_helper_spec.rb
+7
-0
No files found.
app/helpers/notifier_helper.rb
View file @
451e6087
...
...
@@ -5,7 +5,7 @@ module NotifierHelper
# @return [String] The formatted post.
def
post_message
(
post
,
opts
=
{})
if
post
.
respond_to?
:message
post
.
message
.
plain_text_without_markdown
post
.
message
.
try
(
:plain_text_without_markdown
)
||
post_page_title
(
post
)
else
I18n
.
translate
'notifier.a_post_you_shared'
end
...
...
spec/helpers/notifier_helper_spec.rb
View file @
451e6087
...
...
@@ -14,6 +14,13 @@ describe NotifierHelper, :type => :helper do
it
'strip markdown in the post'
do
expect
(
post_message
(
@markdown_post
)).
to
eq
(
@striped_markdown_post
)
end
it
"falls back to the title, if the root post was deleted"
do
reshare
=
FactoryGirl
.
create
(
:reshare
)
reshare
.
root
.
destroy
expect
(
helper
.
post_message
(
Reshare
.
find
(
reshare
.
id
)))
.
to
eq
(
I18n
.
t
(
"posts.show.reshare_by"
,
author:
reshare
.
author_name
))
end
end
describe
'#comment_message'
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