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,9 +36,11 @@ class NotificationsController < ApplicationController
|
||||||
|
|
||||||
pager.replace(result)
|
pager.replace(result)
|
||||||
end
|
end
|
||||||
|
if request.format != :json
|
||||||
@notifications.each do |n|
|
@notifications.each do |n|
|
||||||
n[:note_html] = render_to_string( :partial => 'notify_popup_item', :locals => { :n => n } )
|
n[:note_html] = render_to_string( :partial => 'notify_popup_item', :locals => { :n => n } )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
@group_days = @notifications.group_by{|note| I18n.l(note.created_at, :format => I18n.t('date.formats.fullmonth_day')) }
|
@group_days = @notifications.group_by{|note| I18n.l(note.created_at, :format => I18n.t('date.formats.fullmonth_day')) }
|
||||||
|
|
||||||
@unread_notification_count = current_user.unread_notifications.count
|
@unread_notification_count = current_user.unread_notifications.count
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ describe Notification do
|
||||||
:actors => [@person],
|
:actors => [@person],
|
||||||
:recipient_id => @user.id}
|
:recipient_id => @user.id}
|
||||||
@note = Notification.new(@opts)
|
@note = Notification.new(@opts)
|
||||||
@note.type = 'Notifications::CommentOnPost'
|
|
||||||
@note.actors =[ @person]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'destoys the associated notification_actor' do
|
it 'destoys the associated notification_actor' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue