OSDN Git Service

t#32246:add sheet
[pettanr/pettanr.git] / spec / models / sheet_panel_spec.rb
index 5eadaa5..14ab7b8 100644 (file)
@@ -878,48 +878,6 @@ describe SheetPanel do
     end
   end
   
-  describe 'ライセンス素材に於いて' do
-    before do
-      #コマを作成しておく。
-      @op2 = FactoryGirl.create :original_picture, :artist_id => @artist.id
-      @p2 = FactoryGirl.create :picture, :original_picture_id => @op2.id, :license_id => @license.id, :artist_id => @artist.id
-      @rp2 = FactoryGirl.create :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op2.id, :picture_id => @p2.id
-      @panel = FactoryGirl.create :panel, :author_id => @author.id
-      @pp = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 0, :width => @p.width, :height => @p.height, :picture_id => @p.id
-      @panel.reload
-      @panel2 = FactoryGirl.create :panel, :author_id => @author.id
-      @pp2= FactoryGirl.create :panel_picture, :panel_id => @panel2.id, :t => 0, :width => @p2.width, :height => @p2.height, :picture_id => @p2.id
-      @panel2.reload
-      
-      @sheet = FactoryGirl.create :sheet, :author_id => @author.id
-      @sheet_panel = FactoryGirl.create :sheet_panel, :author_id => @author.id, :sheet_id => @sheet.id, :panel_id => @panel.id
-      @sheet_panel2 = FactoryGirl.create :sheet_panel, :author_id => @author.id, :sheet_id => @sheet.id, :panel_id => @panel2.id
-    end
-    context '事前チェック' do
-    end
-    context 'つつがなく終わるとき' do
-    end
-    it '連想配列(値は実素材、キーは実素材id)を返している' do
-      r = SheetPanel.licensed_pictures [@sheet_panel, @sheet_panel2]
-      r.is_a?(Hash).should be_true
-      r.should have(2).items
-      r[@pp.picture_id].should eq @p
-      r[@pp2.picture_id].should eq @p2
-    end
-    context 'コマが削除されているときき' do
-      before do
-        @panel2.destroy
-      end
-      it '削除されているコマは無視する' do
-        r = SheetPanel.licensed_pictures [@sheet_panel, @sheet_panel2]
-        r.is_a?(Hash).should be_true
-        r.should have(1).items
-        r[@pp.picture_id].should eq @p
-        r[@pp2.picture_id].should be_nil
-      end
-    end
-  end
-  
   describe 't補充値に於いて' do
     before do
       @sheet = FactoryGirl.create :sheet, :author_id => @author.id