Fix notificationscontroller spec

This commit is contained in:
Raphael Sofaer 2011-02-17 15:27:15 -05:00
parent 2394d40603
commit 51bc26c3df

View file

@ -30,7 +30,8 @@ describe RequestsController do
end
it "marks the notification as read" do
notification = Notification.where(:recipient_id => @user.id, :target_id=> @friend_request.id).first
notification.reload.unread.should == true
notification.unread = true
notification.save
xhr :delete, :destroy,
:accept => "true",
:aspect_id => @user.aspects.first.id.to_s,
@ -53,7 +54,8 @@ describe RequestsController do
it "marks the notification as read" do
notification = Notification.where(:recipient_id => @user.id, :target_id=> @friend_request.id).first
notification.reload.unread.should == true
notification.unread = true
notification.save
xhr :delete, :destroy,
:id => @friend_request.id.to_s
notification.reload.unread.should == false