1 # -*- encoding: utf-8 -*-
\r
3 require 'spec_helper'
\r
7 SpeechBalloonTemplate.delete_all
\r
8 @admin = FactoryGirl.create :admin
\r
9 @user = FactoryGirl.create( :user_yas)
\r
10 @author = FactoryGirl.create :author, :user_id => @user.id
\r
11 @other_user = FactoryGirl.create( :user_yas)
\r
12 @other_author = FactoryGirl.create :author, :user_id => @other_user.id
\r
13 @other_artist = FactoryGirl.create :artist_yas, :author_id => @other_author.id
\r
14 @sp = FactoryGirl.create :system_picture
\r
15 @lg = FactoryGirl.create :license_group
\r
16 @license = FactoryGirl.create :license, :license_group_id => @lg.id, :system_picture_id => @sp.id
\r
18 @writing_format = FactoryGirl.create :writing_format
\r
19 SpeechBalloonTemplate.delete_all
\r
20 @speech_balloon_template = FactoryGirl.create :speech_balloon_template, "name" => "circle@pettan.com", "classname" => "CircleSpeechBalloon", "caption" => "cc", "system_picture_id" => @sp.id, "settings" => '{}'
\r
21 @panel = FactoryGirl.create :panel, :author_id => @author.id
\r
24 describe '検証に於いて' do
\r
26 @sb = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
27 @speech = @sb.build_speech(
\r
28 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
\r
30 @balloon = @sb.build_balloon(
\r
31 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
37 context 'オーソドックスなデータのとき' do
\r
39 @speech.font_size = 1.0
\r
40 @speech.text_align = 0
\r
41 @speech.fore_color = 0
\r
47 @speech.should be_valid
\r
50 @speech.font_size = 99999.0
\r
51 @speech.text_align = 3
\r
52 @speech.fore_color = 0xffffff
\r
55 @speech.width = 99999
\r
56 @speech.height = 99999
\r
57 @speech.quotes = '[ ] [ ] [ ] [ ]'
\r
58 @speech.should be_valid
\r
62 context 'speech_balloon_idを検証するとき' do
\r
63 #ネストの保存はnilを許可しなければならないので数値チェックだけ
\r
65 @speech.speech_balloon_id = @sb.id
\r
66 @speech.should be_valid
\r
69 @speech.speech_balloon_id = 'a'
\r
70 @speech.should_not be_valid
\r
73 context 'contentを検証するとき' do
\r
75 context 'font_sizeを検証するとき' do
\r
77 @speech.font_size = nil
\r
78 @speech.should_not be_valid
\r
81 @speech.font_size = 'a'
\r
82 @speech.should_not be_valid
\r
85 @speech.font_size = '0'
\r
86 @speech.should be_valid
\r
89 @speech.font_size = '0'
\r
90 @speech.should be_valid
\r
93 @speech.font_size = 10.5
\r
94 @speech.should be_valid
\r
97 context 'text_alignを検証するとき' do
\r
99 @speech.text_align = nil
\r
100 @speech.should_not be_valid
\r
102 it '数値でなければ失敗する' do
\r
103 @speech.text_align = 'a'
\r
104 @speech.should_not be_valid
\r
107 @speech.text_align = '0'
\r
108 @speech.should be_valid
\r
111 @speech.text_align = -1
\r
112 @speech.should_not be_valid
\r
115 @speech.text_align = 4
\r
116 @speech.should_not be_valid
\r
119 context 'fore_colorを検証するとき' do
\r
121 @speech.fore_color = nil
\r
122 @speech.should_not be_valid
\r
124 it '数値でなければ失敗する' do
\r
125 @speech.fore_color = 'a'
\r
126 @speech.should_not be_valid
\r
129 @speech.fore_color = '0'
\r
130 @speech.should be_valid
\r
133 @speech.fore_color = -1
\r
134 @speech.should_not be_valid
\r
136 it '24bit colorでなければ失敗する' do
\r
137 @speech.fore_color = 0x1000000
\r
138 @speech.should_not be_valid
\r
141 context 'xを検証するとき' do
\r
144 @speech.should_not be_valid
\r
146 it '数値でなければ失敗する' do
\r
148 @speech.should_not be_valid
\r
152 @speech.should be_valid
\r
156 @speech.should be_valid
\r
159 context 'yを検証するとき' do
\r
162 @speech.should_not be_valid
\r
164 it '数値でなければ失敗する' do
\r
166 @speech.should_not be_valid
\r
170 @speech.should be_valid
\r
174 @speech.should be_valid
\r
177 context 'widthを検証するとき' do
\r
179 @speech.width = nil
\r
180 @speech.should_not be_valid
\r
182 it '数値でなければ失敗する' do
\r
183 @speech.width = 'a'
\r
184 @speech.should_not be_valid
\r
187 @speech.width = '0'
\r
188 @speech.should_not be_valid
\r
192 @speech.should_not be_valid
\r
195 context 'heightを検証するとき' do
\r
197 @speech.height = nil
\r
198 @speech.should_not be_valid
\r
200 it '数値でなければ失敗する' do
\r
201 @speech.height = 'a'
\r
202 @speech.should_not be_valid
\r
205 @speech.height = '0'
\r
206 @speech.should_not be_valid
\r
209 @speech.height = -1
\r
210 @speech.should_not be_valid
\r
213 context 'quotesを検証するとき' do
\r
215 @speech.quotes = '[ ] ['
\r
216 @speech.should_not be_valid
\r
218 it '16文字以上なら失敗する' do
\r
219 @speech.quotes = '[ ] [ ] [ ] [ ] [ ]'
\r
220 @speech.should_not be_valid
\r
223 context 'settingsを検証するとき' do
\r
227 describe '文字コード検証に於いて' do
\r
229 @sb = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
230 @speech = @sb.build_speech(
\r
231 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
\r
233 @balloon = @sb.build_balloon(
\r
234 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
240 context 'contentを検証するとき' do
\r
241 it 'Shift JISなら失敗する' do
\r
242 @speech.content = "\x83G\x83r\x83]\x83D"
\r
244 @speech.valid_encode
\r
245 }.should raise_error(Pettanr::BadRequest)
\r
249 context 'quotesを検証するとき' do
\r
250 it 'Shift JISなら失敗する' do
\r
251 @speech.quotes = "\x83G \x83r \x83 ]\x83D"
\r
253 @speech.valid_encode
\r
254 }.should raise_error(Pettanr::BadRequest)
\r
258 context 'settingsを検証するとき' do
\r
259 it 'Shift JISなら失敗する' do
\r
260 @speech.settings = "\x83G\x83r\x83]\x83D"
\r
262 @speech.valid_encode
\r
263 }.should raise_error(Pettanr::BadRequest)
\r
268 describe '閲覧許可に於いて' do
\r
270 @sb = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
271 @speech = @sb.build_speech(
\r
272 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
\r
274 @balloon = @sb.build_balloon(
\r
275 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
280 context 'オープンモードのとき' do
\r
282 MagicNumber['run_mode'] = 0
\r
284 it '自身にゲスト用ロールチェックを問い合わせしている' do
\r
285 Speech.any_instance.stub(:guest_role_check).and_return(true)
\r
286 Speech.any_instance.should_receive(:guest_role_check).with(any_args).exactly(1)
\r
287 r = @speech.visible?([@author])
\r
289 it 'ゲスト用ロールチェックが失敗したとき、falseを返す' do
\r
290 Speech.any_instance.stub(:guest_role_check).and_return(false)
\r
291 r = @speech.visible?([@author])
\r
295 context 'クローズドモードのとき' do
\r
297 MagicNumber['run_mode'] = 1
\r
299 it '自身に読者用ロールチェックを問い合わせしている' do
\r
300 Speech.any_instance.stub(:reader_role_check).and_return(true)
\r
301 Speech.any_instance.should_receive(:reader_role_check).with(any_args).exactly(1)
\r
302 r = @speech.visible?([@author])
\r
304 it '読者用ロールチェックが失敗したとき、falseを返す' do
\r
305 Speech.any_instance.stub(:reader_role_check).and_return(false)
\r
306 r = @speech.visible?([@author])
\r
310 context '事前チェックする' do
\r
312 MagicNumber['run_mode'] = 1
\r
313 Speech.any_instance.stub(:reader_role_check).and_return(true)
\r
315 it '自身のコマに所持判定を問い合わせしている' do
\r
316 Panel.any_instance.stub(:own?).and_return(true)
\r
317 Panel.any_instance.should_receive(:own?).with(any_args).exactly(1)
\r
318 r = @speech.visible?([@author])
\r
320 it '自身のコマに閲覧許可を問い合わせしている' do
\r
321 Panel.any_instance.stub(:own?).and_return(false)
\r
322 Panel.any_instance.stub(:visible?).and_return(true)
\r
323 Panel.any_instance.should_receive(:visible?).with(any_args).exactly(1)
\r
324 r = @speech.visible?([@author])
\r
327 context 'つつがなく終わるとき' do
\r
329 MagicNumber['run_mode'] = 1
\r
330 Panel.any_instance.stub(:reader_role_check).and_return(true)
\r
332 it '自分のコマのセリフなら許可する' do
\r
333 Panel.any_instance.stub(:own?).and_return(true)
\r
334 Panel.any_instance.stub(:visible?).and_return(false)
\r
335 r = @speech.visible?([@author])
\r
338 it '他人の非公開コマのセリフなら許可しない' do
\r
339 Panel.any_instance.stub(:own?).and_return(false)
\r
340 Panel.any_instance.stub(:visible?).and_return(false)
\r
341 r = @speech.visible?([@author])
\r
344 it '他人のコマのセリフでも公開なら許可する' do
\r
345 Panel.any_instance.stub(:own?).and_return(false)
\r
346 Panel.any_instance.stub(:visible?).and_return(true)
\r
347 r = @speech.visible?([@author])
\r
353 describe '一覧取得に於いて' do
\r
355 @sb = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
356 @speech = @sb.build_speech(
\r
357 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
\r
359 @balloon = @sb.build_balloon(
\r
360 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
365 context 'page補正について' do
\r
366 it '文字列から数値に変換される' do
\r
367 Speech.page('8').should eq 8
\r
369 it 'nilの場合は1になる' do
\r
370 Speech.page().should eq 1
\r
372 it '0以下の場合は1になる' do
\r
373 Speech.page('0').should eq 1
\r
376 context 'page_size補正について' do
\r
377 it '文字列から数値に変換される' do
\r
378 Speech.page_size('7').should eq 7
\r
380 it 'nilの場合はSpeech.default_page_sizeになる' do
\r
381 Speech.page_size().should eq Speech.default_page_size
\r
383 it '0以下の場合はSpeech.default_page_sizeになる' do
\r
384 Speech.page_size('0').should eq Speech.default_page_size
\r
386 it 'Speech.max_page_sizeを超えた場合はSpeech.max_page_sizeになる' do
\r
387 Speech.page_size('1000').should eq Speech.max_page_size
\r
390 context 'つつがなく終わるとき' do
\r
391 it '一覧取得オプションを利用している' do
\r
392 Speech.stub(:list_opt).with(any_args).and_return({:include => {:speech_balloon => {:panel => {}}}})
\r
393 Speech.should_receive(:list_opt).with(any_args).exactly(1)
\r
399 r.should eq [@speech]
\r
402 #公開されたコマのセリフは(他人のセリフであっても)含んでいる
\r
403 hc = FactoryGirl.create :panel, :author_id => @other_author.id, :publish => 1
\r
404 nsb = FactoryGirl.build :speech_balloon, :panel_id => hc.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
405 npl = nsb.build_speech(
\r
406 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 100)
\r
409 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
414 r.should eq [npl, @speech]
\r
416 it '非公開のコマのセリフは自分のセリフであっても含まない' do
\r
417 hc = FactoryGirl.create :panel, :author_id => @author.id, :publish => 0
\r
418 nsb = FactoryGirl.build :speech_balloon, :panel_id => hc.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
419 npl = nsb.build_speech(
\r
420 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 100)
\r
423 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
428 pl.should eq [@speech]
\r
430 context 'DBに5件あって1ページの件数を2件に変えたとして' do
\r
432 @sb2 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
433 @speech2 = @sb2.build_speech(
\r
434 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 100)
\r
436 @balloon2 = @sb2.build_balloon(
\r
437 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
441 @sb3 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
442 @speech3 = @sb3.build_speech(
\r
443 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 200)
\r
445 @balloon3 = @sb3.build_balloon(
\r
446 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
450 @sb4 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
451 @speech4 = @sb4.build_speech(
\r
452 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 300)
\r
454 @balloon4 = @sb4.build_balloon(
\r
455 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
459 @sb5 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
460 @speech5 = @sb5.build_speech(
\r
461 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 400)
\r
463 @balloon5 = @sb5.build_balloon(
\r
464 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
468 Speech.stub(:default_page_size).and_return(2)
\r
472 pl.should have(2).items
\r
474 it 'page=1なら末尾2件を返す' do
\r
476 pl = Speech.list(1)
\r
477 pl.should eq [@speech5, @speech4]
\r
479 it 'page=2なら中間2件を返す' do
\r
480 pl = Speech.list(2)
\r
481 pl.should eq [@speech3, @speech2]
\r
483 it 'page=3なら先頭1件を返す' do
\r
484 pl = Speech.list(3)
\r
485 pl.should eq [@speech]
\r
488 context 'DBに5件あって1ページの件数を0件に変えたとして' do
\r
490 @sb2 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
491 @speech2 = @sb2.build_speech(
\r
492 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 100)
\r
494 @balloon2 = @sb2.build_balloon(
\r
495 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
499 @sb3 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
500 @speech3 = @sb3.build_speech(
\r
501 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 200)
\r
503 @balloon3 = @sb3.build_balloon(
\r
504 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
508 @sb4 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
509 @speech4 = @sb4.build_speech(
\r
510 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 300)
\r
512 @balloon4 = @sb4.build_balloon(
\r
513 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
517 @sb5 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
518 @speech5 = @sb5.build_speech(
\r
519 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 400)
\r
521 @balloon5 = @sb5.build_balloon(
\r
522 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
526 Speech.stub(:default_page_size).and_return(2)
\r
528 it '通常は全件(5件)を返す' do
\r
529 r = Speech.list 5, 0
\r
530 r.should have(5).items
\r
534 describe '一覧取得オプションに於いて' do
\r
535 it 'includeキーを含んでいる' do
\r
536 r = Speech.list_opt
\r
537 r.has_key?(:include).should be_true
\r
539 it '1つの項目を含んでいる' do
\r
540 r = Speech.list_opt[:include]
\r
541 r.should have(1).items
\r
544 r = Speech.list_opt[:include]
\r
545 r.has_key?(:speech_balloon).should be_true
\r
547 it 'フキダシはコマを含んでいる' do
\r
548 r = Speech.list_opt[:include]
\r
549 r[:speech_balloon].has_key?(:panel).should be_true
\r
551 it 'コマは作家を含んでいる' do
\r
552 r = Speech.list_opt[:include]
\r
553 r[:speech_balloon][:panel].has_key?(:author).should be_true
\r
555 it 'フキダシはフキダシ枠を含んでいる' do
\r
556 r = Speech.list_opt[:include]
\r
557 r[:speech_balloon].has_key?(:balloon).should be_true
\r
559 it 'フキダシはフキダシテンプレートを含んでいる' do
\r
560 r = Speech.list_opt[:include]
\r
561 r[:speech_balloon].has_key?(:speech_balloon_template).should be_true
\r
564 describe 'json一覧出力オプションに於いて' do
\r
566 @sb = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
567 @speech = @sb.build_speech(
\r
568 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
\r
570 @balloon = @sb.build_balloon(
\r
571 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
577 r = Speech.list.to_json Speech.list_json_opt
\r
580 i.has_key?('speech_balloon').should be_true
\r
582 it 'フキダシはコマを含んでいる' do
\r
583 r = Speech.list.to_json Speech.list_json_opt
\r
586 s = i['speech_balloon']
\r
587 s.has_key?('panel').should be_true
\r
589 it 'コマは作家を含んでいる' do
\r
590 r = Speech.list.to_json Speech.list_json_opt
\r
593 s = i['speech_balloon']['panel']
\r
594 s.has_key?('author').should be_true
\r
596 it 'フキダシはフキダシ枠を含んでいる' do
\r
597 r = Speech.list.to_json Speech.list_json_opt
\r
600 s = i['speech_balloon']
\r
601 s.has_key?('balloon').should be_true
\r
603 it 'フキダシはフキダシテンプレートを含んでいる' do
\r
604 r = Speech.list.to_json Speech.list_json_opt
\r
607 s = i['speech_balloon']
\r
608 s.has_key?('speech_balloon_template').should be_true
\r
612 describe '単体取得に於いて' do
\r
614 @sb = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
615 @speech = @sb.build_speech(
\r
616 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
\r
618 @balloon = @sb.build_balloon(
\r
619 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
624 context 'つつがなく終わるとき' do
\r
625 it '単体取得オプションを利用している' do
\r
626 Speech.stub(:show_opt).with(any_args).and_return({:include => {:speech_balloon => {:panel => {}}}})
\r
627 Speech.should_receive(:show_opt).with(any_args).exactly(1)
\r
628 r = Speech.show @speech.id, @author
\r
630 it '閲覧許可を問い合わせている' do
\r
631 Speech.any_instance.stub(:visible?).with(any_args).and_return(true)
\r
632 Speech.any_instance.should_receive(:visible?).with(any_args).exactly(1)
\r
633 r = Speech.show @speech.id, @author
\r
637 Speech.any_instance.stub(:visible?).and_return(true)
\r
638 pl = Speech.show @speech.id, @author
\r
639 pl.should eq @speech
\r
641 context '閲覧許可が出なかったとき' do
\r
642 it '403Forbidden例外を返す' do
\r
643 Speech.any_instance.stub(:visible?).and_return(false)
\r
645 Speech.show @speech.id, @author
\r
646 }.should raise_error(ActiveRecord::Forbidden)
\r
649 context '存在しないセリフを開こうとしたとき' do
\r
650 it '404RecordNotFound例外を返す' do
\r
652 Speech.show 110, @author
\r
653 }.should raise_error(ActiveRecord::RecordNotFound)
\r
657 describe '単体取得オプションに於いて' do
\r
658 it 'includeキーを含んでいる' do
\r
659 r = Speech.show_opt
\r
660 r.has_key?(:include).should be_true
\r
662 it '1つの項目を含んでいる' do
\r
663 r = Speech.show_opt[:include]
\r
664 r.should have(1).items
\r
667 r = Speech.show_opt[:include]
\r
668 r.has_key?(:speech_balloon).should be_true
\r
670 it 'フキダシはコマを含んでいる' do
\r
671 r = Speech.show_opt[:include]
\r
672 r[:speech_balloon].has_key?(:panel).should be_true
\r
674 it 'コマは作家を含んでいる' do
\r
675 r = Speech.show_opt[:include]
\r
676 r[:speech_balloon][:panel].has_key?(:author).should be_true
\r
678 it 'フキダシはフキダシ枠を含んでいる' do
\r
679 r = Speech.show_opt[:include]
\r
680 r[:speech_balloon].has_key?(:balloon).should be_true
\r
682 it 'フキダシはフキダシテンプレートを含んでいる' do
\r
683 r = Speech.show_opt[:include]
\r
684 r[:speech_balloon].has_key?(:speech_balloon_template).should be_true
\r
687 describe 'json単体出力オプションに於いて' do
\r
689 @sb = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id
\r
690 @speech = @sb.build_speech(
\r
691 FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
\r
693 @balloon = @sb.build_balloon(
\r
694 FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)
\r
700 r = Speech.show(@speech.id, @author).to_json Speech.show_json_opt
\r
703 i.has_key?('speech_balloon').should be_true
\r
706 r = Speech.show(@speech.id, @author).to_json Speech.show_json_opt
\r
708 i = j['speech_balloon']
\r
709 i.has_key?('panel').should be_true
\r
711 it 'コマは作家を含んでいる' do
\r
712 r = Speech.show(@speech.id, @author).to_json Speech.show_json_opt
\r
714 i = j['speech_balloon']
\r
716 s.has_key?('author').should be_true
\r
718 it 'フキダシ枠を含んでいる' do
\r
719 r = Speech.show(@speech.id, @author).to_json Speech.show_json_opt
\r
721 i = j['speech_balloon']
\r
722 i.has_key?('balloon').should be_true
\r
724 it 'フキダシテンプレートを含んでいる' do
\r
725 r = Speech.show(@speech.id, @author).to_json Speech.show_json_opt
\r
727 i = j['speech_balloon']
\r
728 i.has_key?('speech_balloon_template').should be_true
\r