add test :unread => true
This commit is contained in:
parent
4cd07981b0
commit
10aea3ebce
1 changed files with 8 additions and 0 deletions
|
|
@ -49,6 +49,14 @@ describe PostsController do
|
|||
}.should change(note, :unread).from(true).to(false)
|
||||
end
|
||||
|
||||
it 'change from unread to read a corresponding notification' do
|
||||
FactoryGirl.create(:notification, :target => @message, :recipient => alice, :unread => true)
|
||||
FactoryGirl.create(:notification, :recipient => alice, :unread => false)
|
||||
Notification.where(:unread => true).count.should == 1
|
||||
get :show, :id => @message.id
|
||||
Notification.where(:unread => true).count.should == 0
|
||||
end
|
||||
|
||||
it 'succeeds with a AS/photo' do
|
||||
photo = FactoryGirl.create(:activity_streams_photo, :author => bob.person)
|
||||
get :show, :id => photo.id
|
||||
|
|
|
|||
Loading…
Reference in a new issue