add application helper to notification helper spec, made the link an object_link rather than status_message_link
This commit is contained in:
parent
bb62a3dc61
commit
77fc40d404
2 changed files with 2 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ module NotificationsHelper
|
||||||
elsif note.instance_of?(Notifications::Liked)
|
elsif note.instance_of?(Notifications::Liked)
|
||||||
post = note.target
|
post = note.target
|
||||||
if post
|
if post
|
||||||
"#{translation(target_type, post.author.name)} #{link_to t('notifications.post'), status_message_path(post), 'data-ref' => post.id, :class => 'hard_object_link'}".html_safe
|
"#{translation(target_type, post.author.name)} #{link_to t('notifications.post'), object_path(post), 'data-ref' => post.id, :class => 'hard_object_link'}".html_safe
|
||||||
else
|
else
|
||||||
t('notifications.liked_post_deleted')
|
t('notifications.liked_post_deleted')
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
|
|
||||||
describe NotificationsHelper do
|
describe NotificationsHelper do
|
||||||
|
include ApplicationHelper
|
||||||
before do
|
before do
|
||||||
@user = Factory(:user)
|
@user = Factory(:user)
|
||||||
@person = Factory(:person)
|
@person = Factory(:person)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue