From 4b9c8487e692c2aa2142bdfd8620d257c3512e98 Mon Sep 17 00:00:00 2001 From: Jakob Kramer Date: Mon, 1 Aug 2011 20:10:35 +0200 Subject: [PATCH] test for issue #1602's fix; typos --- spec/controllers/photos_controller_spec.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/controllers/photos_controller_spec.rb b/spec/controllers/photos_controller_spec.rb index 329d76e36..483389931 100644 --- a/spec/controllers/photos_controller_spec.rb +++ b/spec/controllers/photos_controller_spec.rb @@ -135,6 +135,12 @@ describe PhotosController do Photo.find_by_id(@alices_photo.id).should be_nil end + it 'will let you delete your profile picture' do + get :make_profile_photo, :photo_id => @alices_photo.id + delete :destroy, :id => @alices_photo.id + Photo.find_by_id(@alices_photo.id).should be_nil + end + it 'sends a retraction on delete' do alice.should_receive(:retract).with(@alices_photo) delete :destroy, :id => @alices_photo.id @@ -145,7 +151,7 @@ describe PhotosController do Photo.find_by_id(@bobs_photo.id).should be_true end - it 'will not let you destory posts you do not own' do + it 'will not let you destroy posts you do not own' do eves_photo = eve.post(:photo, :user_file => uploaded_photo, :to => eve.aspects.first.id, :public => true) delete :destroy, :id => eves_photo.id Photo.find_by_id(eves_photo.id).should be_true @@ -221,7 +227,7 @@ describe PhotosController do end end - describe '.additonal_photos' do + describe '.additional_photos' do it 'finds all of a parent status messages photos' do sm = alice.post(:status_message, :text => 'yes', :to => alice.aspects.first) @alices_photo.status_message = sm