Merge pull request #1711 from gandaro/1602-delete-profile-photo

test for issue #1602's fix; typos
This commit is contained in:
Raphael Sofaer 2011-08-01 16:11:17 -07:00
commit 65c4b1ceaf

View file

@ -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