OSDN Git Service

repair test
authoryasushiito <yas@pen-chan.jp>
Tue, 10 Jul 2012 23:42:03 +0000 (08:42 +0900)
committeryasushiito <yas@pen-chan.jp>
Tue, 10 Jul 2012 23:42:03 +0000 (08:42 +0900)
app/models/license_group.rb
spec/controllers/license_groups_controller_spec.rb
spec/controllers/panel_pictures_controller_spec.rb
spec/controllers/resource_pictures_controller_spec.rb
spec/models/panel_picture_spec.rb
spec/models/panel_spec.rb

index 9ea51e5..fa67c7b 100644 (file)
@@ -22,7 +22,7 @@ class LicenseGroup < ActiveRecord::Base
   end
   
   def self.import filename
-   p LicenseGroup.import_file(filename) {|name, attr| LicenseGroup.store(name, attr)}
+    LicenseGroup.import_file(filename) {|name, attr| LicenseGroup.store(name, attr)}
   end
   
   def self.list opt = {}
index 9064b78..c148906 100644 (file)
@@ -6,7 +6,9 @@ describe LicenseGroupsController do
   before do
     @admin = Factory :admin
     @user = Factory( :user_yas)
+    @sp = Factory :system_picture
     @lg = Factory :license_group, :name => 'peta'
+    @license = Factory :license, :license_group_id => @lg.id, :system_picture_id => @sp.id
   end
 
   describe '一覧表示に於いて' do
index 4fde5c5..2a1f8b3 100644 (file)
@@ -11,8 +11,9 @@ 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
+    @op = Factory :original_picture, :artist_id => @artist.id
+    @p = Factory :picture, :original_picture_id => @op.id, :license_id => @license.id, :artist_id => @artist.id
+    @rp = Factory :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op.id, :picture_id => @p.id
   end
 
   describe '一覧表示に於いて' do
index d45e33f..26927d6 100644 (file)
@@ -11,7 +11,7 @@ describe ResourcePicturesController 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
+    @op = Factory :original_picture, :artist_id => @artist.id
   end
 
   describe '一覧表示に於いて' do
index a15713c..3f593f9 100644 (file)
@@ -10,8 +10,9 @@ describe PanelPicture do
     @sp = Factory :system_picture
     @lg = Factory :license_group
     @license = Factory :license, :license_group_id => @lg.id, :system_picture_id => @sp.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
+    @op = Factory :original_picture, :artist_id => @artist.id
+    @p = Factory :picture, :original_picture_id => @op.id, :license_id => @license.id, :artist_id => @artist.id
+    @rp = Factory :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op.id, :picture_id => @p.id
     @panel = Factory :panel, :author_id => @author.id
   end
   
index 4e54620..7ae0330 100644 (file)
@@ -13,8 +13,9 @@ describe Panel do
     @other_user = Factory( :user_yas)\r
     @other_author = @other_user.author\r
     @other_artist = Factory :artist_yas, :author_id => @other_author.id\r
-    @op = Factory :original_picture, :artist_id => @artist.id, :license_id => @license.id\r
-    @rp = Factory :resource_picture, :original_picture_id => @op.id, :license_id => @license.id\r
+    @op = Factory :original_picture, :artist_id => @artist.id
+    @p = Factory :picture, :original_picture_id => @op.id, :license_id => @license.id, :artist_id => @artist.id
+    @rp = Factory :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op.id, :picture_id => @p.id
     @sbt = Factory :speech_balloon_template\r
   end\r
   \r