1 # -*- encoding: utf-8 -*-
4 describe PanelPicture do
6 SpeechBalloonTemplate.delete_all
7 @admin = FactoryGirl.create :admin
8 @user = FactoryGirl.create( :user_yas)
9 @author = FactoryGirl.create :author, :user_id => @user.id
10 @artist = FactoryGirl.create :artist_yas, :author_id => @author.id
11 @other_user = FactoryGirl.create( :user_yas)
12 @other_author = FactoryGirl.create :author, :user_id => @other_user.id
13 @other_artist = FactoryGirl.create :artist_yas, :author_id => @other_author.id
14 @sp = FactoryGirl.create :system_picture
15 @lg = FactoryGirl.create :license_group
16 @license = FactoryGirl.create :license, :license_group_id => @lg.id, :system_picture_id => @sp.id
17 @op = FactoryGirl.create :original_picture, :artist_id => @artist.id
18 @p = FactoryGirl.create :picture, :original_picture_id => @op.id, :license_id => @license.id, :artist_id => @artist.id
19 @rp = FactoryGirl.create :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op.id, :picture_id => @p.id
20 @panel = FactoryGirl.create :panel, :author_id => @author.id
25 @pp = FactoryGirl.build :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
26 :width => @p.width, :height => @p.height
27 Picture.any_instance.stub(:flag_reverse).with(any_args).and_return(0)
28 Picture.any_instance.stub(:flag_resize).with(any_args).and_return(0)
29 Picture.any_instance.stub(:flag_sync_vh).with(any_args).and_return(0)
32 context 'オーソドックスなデータのとき' do
34 @pp.link = 'http://test.jp/'
44 @pp.link = 'http://test.jp/aaaaa' + 'a' * 180
55 context 'panel_idを検証するとき' do
56 #ネストの保存はnilを許可しなければならないので数値チェックだけ
59 @pp.should_not be_valid
62 context 'linkを検証するとき' do
69 @pp.should_not be_valid
71 it 'url形式でないなら失敗する' do
73 @pp.should_not be_valid
79 @pp.should_not be_valid
83 @pp.should_not be_valid
97 @pp.should_not be_valid
101 @pp.should_not be_valid
112 context 'widthを検証するとき' do
115 @pp.should_not be_valid
119 @pp.should_not be_valid
123 @pp.should_not be_valid
135 Picture.any_instance.stub(:flag_reverse).with(any_args).and_return(-1)
139 @pp.should_not be_valid
142 context 'サイズ変更許可のとき' do
145 it '実素材のサイズと違っても通る' do
146 @pp.width = @p.width-1
150 context 'サイズ変更禁止のとき' do
152 Picture.any_instance.stub(:flag_resize).with(any_args).and_return(-1)
154 it '実素材のサイズと違うなら失敗する' do
155 @pp.width = @p.width-1
156 @pp.should_not be_valid
159 context '縦横比変更許可のとき' do
162 it '実素材の縦横比と違っても通る' do
163 @pp.width = @p.width / 2
167 context '縦横比変更禁止のとき' do
169 Picture.any_instance.stub(:flag_sync_vh).with(any_args).and_return(-1)
171 it '実素材の縦横比と違うなら失敗する' do
172 @pp.width = @p.width / 2
173 @pp.should_not be_valid
177 context 'heightを検証するとき' do
180 @pp.should_not be_valid
184 @pp.should_not be_valid
188 @pp.should_not be_valid
204 Picture.any_instance.stub(:flag_reverse).with(any_args).and_return(-1)
208 @pp.should_not be_valid
211 context 'サイズ変更許可のとき' do
214 it '実素材のサイズと違っても通る' do
215 @pp.height = @p.height-1
219 context 'サイズ変更禁止のとき' do
221 Picture.any_instance.stub(:flag_resize).with(any_args).and_return(-1)
223 it '実素材のサイズと違うなら失敗する' do
224 @pp.height = @p.height-1
225 @pp.should_not be_valid
228 context '縦横比変更許可のとき' do
231 it '実素材の縦横比と違っても通る' do
232 @pp.height = @p.height / 2
236 context '縦横比変更禁止のとき' do
238 Picture.any_instance.stub(:flag_sync_vh).with(any_args).and_return(-1)
240 it '実素材の縦横比と違うなら失敗する' do
241 @pp.height = @p.height / 2
242 @pp.should_not be_valid
246 context 'zを検証するとき' do
249 @pp.should_not be_valid
253 @pp.should_not be_valid
257 @pp.should_not be_valid
261 @pp.should_not be_valid
264 context 'tを検証するとき' do
267 @pp.should_not be_valid
271 @pp.should_not be_valid
275 @pp.should_not be_valid
278 context 'picture_idを検証するとき' do
281 @pp.should_not be_valid
285 @pp.should_not be_valid
287 it '存在する実素材でなければ失敗する' do
289 @pp.should_not be_valid
294 describe '文字コード検証に於いて' do
296 @pp = FactoryGirl.build :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
297 :width => @p.width, :height => @p.height
300 context 'linkを検証するとき' do
301 it 'Shift JISなら失敗する' do
302 @pp.link = "\x83G\x83r\x83]\x83D"
305 }.should raise_error(Pettanr::BadRequest)
309 context 'captionを検証するとき' do
310 it 'Shift JISなら失敗する' do
311 @pp.caption = "\x83G\x83r\x83]\x83D"
314 }.should raise_error(Pettanr::BadRequest)
319 describe '閲覧許可に於いて' do
321 @pp = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
322 :width => @p.width, :height => @p.height
324 context 'オープンモードのとき' do
326 MagicNumber['run_mode'] = 0
328 it '自身にゲスト用ロールチェックを問い合わせしている' do
329 PanelPicture.any_instance.stub(:guest_role_check).and_return(true)
330 PanelPicture.any_instance.should_receive(:guest_role_check).with(any_args).exactly(1)
331 r = @pp.visible?([@author])
333 it 'ゲスト用ロールチェックが失敗したとき、falseを返す' do
334 PanelPicture.any_instance.stub(:guest_role_check).and_return(false)
335 r = @pp.visible?([@author])
339 context 'クローズドモードのとき' do
341 MagicNumber['run_mode'] = 1
343 it '自身に読者用ロールチェックを問い合わせしている' do
344 PanelPicture.any_instance.stub(:reader_role_check).and_return(true)
345 PanelPicture.any_instance.should_receive(:reader_role_check).with(any_args).exactly(1)
346 r = @pp.visible?([@author])
348 it '読者用ロールチェックが失敗したとき、falseを返す' do
349 PanelPicture.any_instance.stub(:reader_role_check).and_return(false)
350 r = @pp.visible?([@author])
354 context '事前チェックする' do
356 MagicNumber['run_mode'] = 1
357 PanelPicture.any_instance.stub(:reader_role_check).and_return(true)
359 it '自身のコマに所持判定を問い合わせしている' do
360 Panel.any_instance.stub(:own?).and_return(true)
361 Panel.any_instance.should_receive(:own?).with(any_args).exactly(1)
362 r = @pp.visible?([@author])
364 it '自身のコマに閲覧許可を問い合わせしている' do
365 Panel.any_instance.stub(:own?).and_return(false)
366 Panel.any_instance.stub(:visible?).and_return(true)
367 Panel.any_instance.should_receive(:visible?).with(any_args).exactly(1)
368 r = @pp.visible?([@author])
371 context 'つつがなく終わるとき' do
373 MagicNumber['run_mode'] = 1
374 Panel.any_instance.stub(:reader_role_check).and_return(true)
376 it '自分のコマのコマ絵なら許可する' do
377 Panel.any_instance.stub(:own?).and_return(true)
378 Panel.any_instance.stub(:visible?).and_return(false)
379 r = @pp.visible?([@author])
382 it '他人の非公開コマのコマ絵なら許可しない' do
383 Panel.any_instance.stub(:own?).and_return(false)
384 Panel.any_instance.stub(:visible?).and_return(false)
385 r = @pp.visible?([@author])
388 it '他人のコマのコマ絵でも公開なら許可する' do
389 Panel.any_instance.stub(:own?).and_return(false)
390 Panel.any_instance.stub(:visible?).and_return(true)
391 r = @pp.visible?([@author])
397 describe '一覧取得に於いて' do
399 @pp = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
400 :width => @p.width, :height => @p.height
402 context 'page補正について' do
403 it '文字列から数値に変換される' do
404 PanelPicture.page('8').should eq 8
407 PanelPicture.page().should eq 1
410 PanelPicture.page('0').should eq 1
413 context 'page_size補正について' do
414 it '文字列から数値に変換される' do
415 PanelPicture.page_size('7').should eq 7
417 it 'nilの場合はPanelPicture.default_page_sizeになる' do
418 PanelPicture.page_size().should eq PanelPicture.default_page_size
420 it '0以下の場合はPanelPicture.default_page_sizeになる' do
421 PanelPicture.page_size('0').should eq PanelPicture.default_page_size
423 it 'PanelPicture.max_page_sizeを超えた場合はPanelPicture.max_page_sizeになる' do
424 PanelPicture.page_size('1000').should eq PanelPicture.max_page_size
427 context 'つつがなく終わるとき' do
428 it '一覧取得オプションを利用している' do
429 PanelPicture.stub(:list_opt).with(any_args).and_return({:include => :panel})
430 PanelPicture.should_receive(:list_opt).with(any_args).exactly(1)
431 r = PanelPicture.list
435 r = PanelPicture.list
439 #公開されたコマのコマ絵は(他人のコマ絵であっても)含んでいる
440 hc = FactoryGirl.create :panel, :author_id => @other_author.id, :publish => 1
441 npl = FactoryGirl.create :panel_picture, :panel_id => hc.id, :t => 0, :picture_id => @p.id,
442 :width => @p.width, :height => @p.height, :updated_at => Time.now + 100
443 r = PanelPicture.list
444 r.should eq [npl, @pp]
446 it '非公開のコマのコマ絵は自分のコマ絵であっても含まない' do
447 hpl = FactoryGirl.create :panel, :author_id => @author.id, :publish => 0
448 npl = FactoryGirl.create :panel_picture, :panel_id => hpl.id, :picture_id => @p.id,
449 :width => @p.width, :height => @p.height
450 pl = PanelPicture.list
453 context 'DBに5件あって1ページの件数を2件に変えたとして' do
455 @npl2 = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 1, :picture_id => @p.id,
456 :width => @p.width, :height => @p.height, :updated_at => Time.now + 100
457 @npl3 = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 2, :picture_id => @p.id,
458 :width => @p.width, :height => @p.height, :updated_at => Time.now + 200
459 @npl4 = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 3, :picture_id => @p.id,
460 :width => @p.width, :height => @p.height, :updated_at => Time.now + 300
461 @npl5 = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 4, :picture_id => @p.id,
462 :width => @p.width, :height => @p.height, :updated_at => Time.now + 400
463 PanelPicture.stub(:default_page_size).and_return(2)
466 pl = PanelPicture.list
467 pl.should have(2).items
469 it 'page=1なら末尾2件を返す' do
471 pl = PanelPicture.list(1)
472 pl.should eq [@npl5, @npl4]
474 it 'page=2なら中間2件を返す' do
475 pl = PanelPicture.list(2)
476 pl.should eq [@npl3, @npl2]
478 it 'page=3なら先頭1件を返す' do
479 pl = PanelPicture.list(3)
485 describe '自分のコマ絵一覧取得に於いて' do
487 @pp = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
488 :width => @p.width, :height => @p.height
490 context 'つつがなく終わるとき' do
491 it '一覧取得オプションを利用している' do
492 PanelPicture.stub(:list_opt).with(any_args).and_return({:include => :panel})
493 PanelPicture.should_receive(:list_opt).with(any_args).exactly(1)
494 r = PanelPicture.mylist @author
498 pl = PanelPicture.mylist @author
502 npl = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 1, :picture_id => @p.id,
503 :width => @p.width, :height => @p.height, :updated_at => Time.now + 100
504 pl = PanelPicture.mylist @author
505 pl.should eq [npl, @pp]
507 it '他人のコマのコマ絵は公開コマでも含まない' do
508 hpl = FactoryGirl.create :panel, :author_id => @other_author.id, :publish => 1
509 npl = FactoryGirl.create :panel_picture, :panel_id => hpl.id, :picture_id => @p.id,
510 :width => @p.width, :height => @p.height
511 pl = PanelPicture.mylist @author
514 it '自分のコマのコマ絵は非公開コマでも含んでいる' do
515 pl = FactoryGirl.create :panel, :author_id => @author.id, :publish => 0
516 ni = FactoryGirl.create :panel_picture, :panel_id => pl.id, :picture_id => @p.id,
517 :width => @p.width, :height => @p.height, :updated_at => Time.now + 100
518 r = PanelPicture.mylist @author
519 r.should eq [ni, @pp]
521 context 'DBに5件あって1ページの件数を2件に変えたとして' do
523 @npl2 = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 1, :picture_id => @p.id,
524 :width => @p.width, :height => @p.height, :updated_at => Time.now + 100
525 @npl3 = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 2, :picture_id => @p.id,
526 :width => @p.width, :height => @p.height, :updated_at => Time.now + 200
527 @npl4 = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 3, :picture_id => @p.id,
528 :width => @p.width, :height => @p.height, :updated_at => Time.now + 300
529 @npl5 = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :t => 4, :picture_id => @p.id,
530 :width => @p.width, :height => @p.height, :updated_at => Time.now + 400
533 r = PanelPicture.mylist @author, 1, 2
534 r.should have(2).items
536 it 'page=1なら末尾2件を返す' do
538 r = PanelPicture.mylist(@author, 1, 2)
539 r.should eq [@npl5, @npl4]
541 it 'page=2なら中間2件を返す' do
542 r = PanelPicture.mylist(@author, 2, 2)
543 r.should eq [@npl3, @npl2]
545 it 'page=3なら先頭1件を返す' do
546 r = PanelPicture.mylist(@author, 3, 2)
552 describe '他作家のコマ絵一覧取得に於いて' do
554 @pp = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
555 :width => @p.width, :height => @p.height
556 @other_panel = FactoryGirl.create :panel, :author_id => @other_author.id, :publish => 1
557 @other_pp = FactoryGirl.create :panel_picture, :panel_id => @other_panel.id, :picture_id => @p.id,
558 :width => @p.width, :height => @p.height
561 r = PanelPicture.himlist @other_author
562 r.should eq [@other_pp]
565 new_panel = FactoryGirl.create :panel, :author_id => @other_author.id, :updated_at => Time.now + 100
566 new_pc = FactoryGirl.create :panel_picture, :panel_id => new_panel.id, :picture_id => @p.id, :width => @p.width, :height => @p.height, :updated_at => Time.now + 100
567 r = PanelPicture.himlist @other_author
568 r.should eq [new_pc, @other_pp]
571 hidden_panel = FactoryGirl.create :panel, :author_id => @other_author.id, :publish => 0
572 hidden_pp = FactoryGirl.create :panel_picture, :panel_id => hidden_panel.id, :picture_id => @p.id, :width => @p.width, :height => @p.height
573 r = PanelPicture.himlist @other_author
574 r.should eq [@other_pp]
576 context 'DBに5件あって1ページの件数を2件に変えたとして' do
578 @other_pp2 = FactoryGirl.create :panel_picture, :panel_id => @other_panel.id, :t => 1, :picture_id => @p.id, :width => @p.width, :height => @p.height, :updated_at => Time.now + 100
579 @other_pp3 = FactoryGirl.create :panel_picture, :panel_id => @other_panel.id, :t => 2, :picture_id => @p.id, :width => @p.width, :height => @p.height, :updated_at => Time.now + 200
580 @other_pp4 = FactoryGirl.create :panel_picture, :panel_id => @other_panel.id, :t => 3, :picture_id => @p.id, :width => @p.width, :height => @p.height, :updated_at => Time.now + 300
581 @other_pp5 = FactoryGirl.create :panel_picture, :panel_id => @other_panel.id, :t => 4, :picture_id => @p.id, :width => @p.width, :height => @p.height, :updated_at => Time.now + 400
584 pl = PanelPicture.himlist @other_author, 1, 2
585 pl.should have(2).items
587 it 'page=1なら末尾2件を返す' do
589 pl = PanelPicture.himlist @other_author, 1, 2
590 pl.should eq [@other_pp5, @other_pp4]
592 it 'page=2なら中間2件を返す' do
593 pl = PanelPicture.himlist @other_author, 2, 2
594 pl.should eq [@other_pp3, @other_pp2]
596 it 'page=3なら先頭1件を返す' do
597 pl = PanelPicture.himlist @other_author, 3, 2
598 pl.should eq [@other_pp]
603 describe 'コマ絵一覧ページ制御に於いて' do
605 PanelPicture.stub(:count).with(any_args).and_return(100)
608 r = PanelPicture.list_paginate
609 r.is_a?(Kaminari::PaginatableArray).should be_true
611 it 'コマ絵一覧の取得条件を利用している' do
612 PanelPicture.stub(:list_where).with(any_args).and_return('')
613 PanelPicture.should_receive(:list_where).with(any_args).exactly(1)
614 r = PanelPicture.list_paginate
616 it 'ページ件数10のとき、3ページ目のオフセットは20から始まる' do
617 r = PanelPicture.list_paginate 3, 10
618 r.limit_value.should eq 10
619 r.offset_value.should eq 20
623 describe '自分のコマ絵一覧ページ制御に於いて' do
625 PanelPicture.stub(:count).with(any_args).and_return(100)
628 r = PanelPicture.mylist_paginate @author
629 r.is_a?(Kaminari::PaginatableArray).should be_true
631 it '自分のコマ絵一覧の取得条件を利用している' do
632 PanelPicture.stub(:mylist_where).with(any_args).and_return('')
633 PanelPicture.should_receive(:mylist_where).with(any_args).exactly(1)
634 r = PanelPicture.mylist_paginate @author
636 it 'ページ件数10のとき、3ページ目のオフセットは20から始まる' do
637 r = PanelPicture.mylist_paginate @author, 3, 10
638 r.limit_value.should eq 10
639 r.offset_value.should eq 20
643 describe '他作家のコマ絵一覧ページ制御に於いて' do
645 PanelPicture.stub(:count).with(any_args).and_return(100)
648 r = PanelPicture.himlist_paginate @other_author
649 r.is_a?(Kaminari::PaginatableArray).should be_true
651 it '他作家のコマ絵一覧の取得条件を利用している' do
652 PanelPicture.stub(:himlist_where).with(any_args).and_return('')
653 PanelPicture.should_receive(:himlist_where).with(any_args).exactly(1)
654 r = PanelPicture.himlist_paginate @other_author
656 it 'ページ件数10のとき、3ページ目のオフセットは20から始まる' do
657 r = PanelPicture.himlist_paginate @other_author, 3, 10
658 r.limit_value.should eq 10
659 r.offset_value.should eq 20
663 describe '一覧取得オプションに於いて' do
665 r = PanelPicture.list_opt
666 r.should have(2).items
669 r = PanelPicture.list_opt
670 r.has_key?(:panel).should be_true
673 r = PanelPicture.list_opt
674 r[:panel].has_key?(:author).should be_true
677 r = PanelPicture.list_opt
678 r.has_key?(:picture).should be_true
681 r = PanelPicture.list_opt
682 r[:picture].has_key?(:artist).should be_true
684 it '実素材はライセンスを含んでいる' do
685 r = PanelPicture.list_opt
686 r[:picture].has_key?(:license).should be_true
689 describe 'json一覧出力オプションに於いて' do
691 @op = FactoryGirl.create :original_picture, :artist_id => @artist.id
692 @p = FactoryGirl.create :picture, :original_picture_id => @op.id, :license_id => @license.id, :artist_id => @artist.id
693 @rp = FactoryGirl.create :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op.id, :picture_id => @p.id
694 @sbt = FactoryGirl.create :speech_balloon_template
695 @panel = FactoryGirl.create :panel, :author_id => @author.id, :publish => 1
696 @pp = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
697 :width => @p.width, :height => @p.height
700 r = PanelPicture.list.to_json PanelPicture.list_json_opt
703 i.has_key?('panel').should be_true
706 r = PanelPicture.list.to_json PanelPicture.list_json_opt
710 s.has_key?('author').should be_true
713 r = PanelPicture.list.to_json PanelPicture.list_json_opt
716 i.has_key?('picture').should be_true
719 r = PanelPicture.list.to_json PanelPicture.list_json_opt
723 s.has_key?('artist').should be_true
725 it '実素材はライセンスを含んでいる' do
726 r = PanelPicture.list.to_json PanelPicture.list_json_opt
730 s.has_key?('license').should be_true
734 describe '単体取得に於いて' do
736 @pp = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
737 :width => @p.width, :height => @p.height
739 context 'つつがなく終わるとき' do
740 it '単体取得オプションを利用している' do
741 PanelPicture.stub(:show_opt).with(any_args).and_return({:include => :panel})
742 PanelPicture.should_receive(:show_opt).with(any_args).exactly(1)
743 r = PanelPicture.show @pp.id, @author
745 it '閲覧許可を問い合わせている' do
746 PanelPicture.any_instance.stub(:visible?).with(any_args).and_return(true)
747 PanelPicture.any_instance.should_receive(:visible?).with(any_args).exactly(1)
748 r = PanelPicture.show @pp.id, @author
752 PanelPicture.any_instance.stub(:visible?).and_return(true)
753 pl = PanelPicture.show @pp.id, @author
756 context '閲覧許可が出なかったとき' do
757 it '403Forbidden例外を返す' do
758 PanelPicture.any_instance.stub(:visible?).and_return(false)
760 PanelPicture.show @pp.id, @author
761 }.should raise_error(ActiveRecord::Forbidden)
764 context '存在しないコマ絵を開こうとしたとき' do
765 it '404RecordNotFound例外を返す' do
767 PanelPicture.show 110, @author
768 }.should raise_error(ActiveRecord::RecordNotFound)
772 describe '単体取得オプションに於いて' do
773 it 'includeキーを含んでいる' do
774 r = PanelPicture.show_opt
775 r.has_key?(:include).should be_true
778 r = PanelPicture.show_opt[:include]
779 r.should have(2).items
782 r = PanelPicture.show_opt[:include]
783 r.has_key?(:panel).should be_true
786 r = PanelPicture.show_opt[:include]
787 r[:panel].has_key?(:author).should be_true
790 r = PanelPicture.show_opt[:include]
791 r.has_key?(:picture).should be_true
794 r = PanelPicture.show_opt[:include]
795 r[:picture].has_key?(:artist).should be_true
797 it '実素材はライセンスを含んでいる' do
798 r = PanelPicture.show_opt[:include]
799 r[:picture].has_key?(:license).should be_true
802 describe 'json単体出力オプションに於いて' do
804 @op = FactoryGirl.create :original_picture, :artist_id => @artist.id
805 @p = FactoryGirl.create :picture, :original_picture_id => @op.id, :license_id => @license.id, :artist_id => @artist.id
806 @rp = FactoryGirl.create :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op.id, :picture_id => @p.id
807 @sbt = FactoryGirl.create :speech_balloon_template
808 @panel = FactoryGirl.create :panel, :author_id => @author.id, :publish => 1
809 @pp = FactoryGirl.create :panel_picture, :panel_id => @panel.id, :picture_id => @p.id,
810 :width => @p.width, :height => @p.height
813 r = PanelPicture.show(@pp.id, @author).to_json PanelPicture.show_json_opt
816 i.has_key?('panel').should be_true
819 r = PanelPicture.show(@pp.id, @author).to_json PanelPicture.show_json_opt
823 s.has_key?('author').should be_true
826 r = PanelPicture.show(@pp.id, @author).to_json PanelPicture.show_json_opt
829 i.has_key?('picture').should be_true
832 r = PanelPicture.show(@pp.id, @author).to_json PanelPicture.show_json_opt
836 s.has_key?('artist').should be_true
838 it '実素材はライセンスを含んでいる' do
839 r = PanelPicture.show(@pp.id, @author).to_json PanelPicture.show_json_opt
843 s.has_key?('license').should be_true