OSDN Git Service

t#29050:fix edit permissin
[pettanr/pettanr.git] / spec / controllers / panel_pictures_controller_spec.rb
index 8665c64..5e8d308 100644 (file)
@@ -9,11 +9,13 @@ describe PanelPicturesController do
     @user = Factory( :user_yas)
     @author = @user.author
     @artist = Factory :artist_yas, :author_id => @author.id
+    @op = Factory :original_picture, :artist_id => @artist.id , :license_id => @license.id
+    @rp = Factory :resource_picture, :artist_id => @artist.id , :license_id => @license.id, :original_picture_id => @op.id
   end
 
   describe '一覧表示に於いて' do
     before do
-      @pp = Factory :panel_picture
+      @pp = Factory :panel_picture, :resource_picture_id => @rp.id
       sign_in @user
       PanelPicture.stub(:list).and_return([@pp, @pp, @pp])
     end