Merge pull request #2998 from diasp/notification-chore
Notifications update spec and cleanup json response [ci skip]
This commit is contained in:
commit
fa247c23ae
2 changed files with 4 additions and 4 deletions
|
|
@ -36,8 +36,10 @@ class NotificationsController < ApplicationController
|
|||
|
||||
pager.replace(result)
|
||||
end
|
||||
@notifications.each do |n|
|
||||
n[:note_html] = render_to_string( :partial => 'notify_popup_item', :locals => { :n => n } )
|
||||
if request.format != :json
|
||||
@notifications.each do |n|
|
||||
n[:note_html] = render_to_string( :partial => 'notify_popup_item', :locals => { :n => n } )
|
||||
end
|
||||
end
|
||||
@group_days = @notifications.group_by{|note| I18n.l(note.created_at, :format => I18n.t('date.formats.fullmonth_day')) }
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ describe Notification do
|
|||
:actors => [@person],
|
||||
:recipient_id => @user.id}
|
||||
@note = Notification.new(@opts)
|
||||
@note.type = 'Notifications::CommentOnPost'
|
||||
@note.actors =[ @person]
|
||||
end
|
||||
|
||||
it 'destoys the associated notification_actor' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue