Skip to content
Extraits de code Groupes Projets
Valider 13407f70 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

fix test

parent 2e85a9fe
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter