From 7556dccb918f30dbbcceeb8ed232a75a44c3d2de Mon Sep 17 00:00:00 2001
From: Jonne Hass <mrzyx@mrzyx.de>
Date: Sun, 6 Nov 2011 14:47:28 +0100
Subject: [PATCH] test that photosController#index succeeds without any photos

---
 spec/controllers/photos_controller_spec.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/spec/controllers/photos_controller_spec.rb b/spec/controllers/photos_controller_spec.rb
index fc1ff3a5a4..fdafd0905f 100644
--- a/spec/controllers/photos_controller_spec.rb
+++ b/spec/controllers/photos_controller_spec.rb
@@ -35,6 +35,12 @@ describe PhotosController do
   end
 
   describe '#index' do
+    it "succeeds without any available pictures" do
+      get :index, :person_id => Factory(:person).id.to_s
+      
+      response.should be_success
+    end
+    
     it "displays the logged in user's pictures" do
       get :index, :person_id => alice.person.id.to_s
       assigns[:person].should == alice.person
-- 
GitLab