@other_user = Factory( :user_yas)
@other_author = @other_user.author
@other_artist = Factory :artist_yas, :author_id => @other_author.id
-
+ @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
end\r
describe '検証に於いて' do
@panel = Factory.build :panel, :author_id => @author.id, :comic_id => @comic.id
end
it 'テストデータの確認' do
- @panel.resource_picture_id = 1
+ @panel.resource_picture_id = @rp.id
@panel.should be_valid
end
it 'nullなら通る' do
@panel.resource_picture_id = 'a'
@panel.should_not be_valid
end
- it '存在する素材でなければ失敗する' do
- @panel.resource_picture_id = 0
- @panel.should_not be_valid
- end
end
context 'widthを検証するとき' do
before do
end
it 'フキダシを含んでいる' do
r = Panel.show_include_opt
- r.has_key?(:balloons).should be_true\r
+ r.has_key?(:speech_balloons).should be_true\r
end
+ it 'フキダシはフキダシ枠を含んでいる' do
+ r = Panel.show_include_opt
+ r[:speech_balloons].has_key?(:balloons).should be_true\r
+ end
it 'フキダシはセリフを含んでいる' do
r = Panel.show_include_opt
- r[:balloons].has_key?(:speeches).should be_true\r
+ r[:speech_balloons].has_key?(:speeches).should be_true\r
end
it '作家を含んでいる' do
r = Panel.show_include_opt
r[:panel_pictures][:resource_picture].has_key?(:license).should be_true\r
end
it 'フキダシを含んでいる' do
- r = Panel.show_json_include_opt[:include]
- r.has_key?(:balloons).should be_true\r
+ r = Panel.show_include_opt
+ r.has_key?(:speech_balloons).should be_true\r
end
+ it 'フキダシはフキダシ枠を含んでいる' do
+ r = Panel.show_include_opt
+ r[:speech_balloons].has_key?(:balloons).should be_true\r
+ end
it 'フキダシはセリフを含んでいる' do
- r = Panel.show_json_include_opt[:include]
- r[:balloons].has_key?(:speeches).should be_true\r
+ r = Panel.show_include_opt
+ r[:speech_balloons].has_key?(:speeches).should be_true\r
end
it '作家を含んでいる' do
r = Panel.show_json_include_opt[:include]
r[:panel_pictures][:resource_picture].has_key?(:license).should be_true\r
end
it 'フキダシを含んでいる' do
- r = Panel.list_opt[:include]
- r.has_key?(:balloons).should be_true\r
+ r = Panel.show_include_opt
+ r.has_key?(:speech_balloons).should be_true\r
end
+ it 'フキダシはフキダシ枠を含んでいる' do
+ r = Panel.show_include_opt
+ r[:speech_balloons].has_key?(:balloons).should be_true\r
+ end
it 'フキダシはセリフを含んでいる' do
- r = Panel.list_opt[:include]
- r[:balloons].has_key?(:speeches).should be_true\r
+ r = Panel.show_include_opt
+ r[:speech_balloons].has_key?(:speeches).should be_true\r
end
it '作家を含んでいる' do
r = Panel.list_opt[:include]
r[:panel_pictures][:resource_picture].has_key?(:license).should be_true\r
end
it 'フキダシを含んでいる' do
- r = Panel.list_json_opt[:include]
- r.has_key?(:balloons).should be_true\r
+ r = Panel.show_include_opt
+ r.has_key?(:speech_balloons).should be_true\r
end
+ it 'フキダシはフキダシ枠を含んでいる' do
+ r = Panel.show_include_opt
+ r[:speech_balloons].has_key?(:balloons).should be_true\r
+ end
it 'フキダシはセリフを含んでいる' do
- r = Panel.list_json_opt[:include]
- r[:balloons].has_key?(:speeches).should be_true\r
+ r = Panel.show_include_opt
+ r[:speech_balloons].has_key?(:speeches).should be_true\r
end
it '作家を含んでいる' do
r = Panel.list_json_opt[:include]