From 51bc26c3dfa244c95c07aab4147119e73c662695 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Thu, 17 Feb 2011 15:27:15 -0500 Subject: [PATCH] Fix notificationscontroller spec --- spec/controllers/requests_controller_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/controllers/requests_controller_spec.rb b/spec/controllers/requests_controller_spec.rb index 92ec71b3c..ed53162c7 100644 --- a/spec/controllers/requests_controller_spec.rb +++ b/spec/controllers/requests_controller_spec.rb @@ -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