Requests create a read, rather than unread, notification
This commit is contained in:
parent
6cf8de94a7
commit
cd7e4d6e8f
2 changed files with 9 additions and 3 deletions
|
|
@ -68,6 +68,7 @@ private
|
|||
:action => action,
|
||||
:recipient_id => recipient.id)
|
||||
n.actors << actor
|
||||
n.unread = false if target.is_a? Request
|
||||
n.save!
|
||||
n
|
||||
end
|
||||
|
|
|
|||
|
|
@ -53,6 +53,11 @@ describe Notification do
|
|||
Notification.notify(@user, @request, @person)
|
||||
end
|
||||
|
||||
it 'creates the notification already read' do
|
||||
n = Notification.notify(@user, @request, @person)
|
||||
n.unread?.should be_false
|
||||
end
|
||||
|
||||
it 'sockets to the recipient' do
|
||||
opts = {:target_id => @request.id,
|
||||
:target_type => "Request",
|
||||
|
|
|
|||
Loading…
Reference in a new issue