From 13407f700e0527e057af32e91421db2661f46f46 Mon Sep 17 00:00:00 2001
From: maxwell <maxwell@joindiaspora.com>
Date: Fri, 17 Dec 2010 17:25:11 -0800
Subject: [PATCH] fix test

---
 spec/controllers/notifications_controller_spec.rb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb
index 8879c946fd..7a41f887fa 100644
--- a/spec/controllers/notifications_controller_spec.rb
+++ b/spec/controllers/notifications_controller_spec.rb
@@ -14,22 +14,22 @@ describe NotificationsController do
 
   end
 
-  describe '#destroy' do
-    it 'removes a notification' do
+  describe '#update' do
+    it 'marks a notification as read' do
       note = Notification.create(:user_id => user.id)
-      delete :destroy, :id => note.id
-      Notification.count.should == 0 
+      put :update, :id => note.id
+      Notification.first.unread.should == false
     end
 
-    it 'only lets you delete your own notifications' do
+    it 'only lets you read your own notifications' do
       user2 = make_user
 
       Notification.create(:user_id => user.id)
       note = Notification.create(:user_id => user2.id)
 
-      delete :destroy, :id => note.id
+      put :update, :id => note.id
 
-      Notification.count.should == 2 
+      Notification.find(note.id).unread.should == true 
     end
   end
 end
-- 
GitLab