\r
describe Speech do\r
before do\r
+ SpeechBalloonTemplate.delete_all\r
@admin = FactoryGirl.create :admin\r
@user = FactoryGirl.create( :user_yas)\r
@author = FactoryGirl.create :author, :user_id => @user.id\r
@license = FactoryGirl.create :license, :license_group_id => @lg.id, :system_picture_id => @sp.id\r
\r
@writing_format = FactoryGirl.create :writing_format\r
+ SpeechBalloonTemplate.delete_all\r
@speech_balloon_template = FactoryGirl.create :speech_balloon_template, "name" => "circle@pettan.com", "classname" => "CircleSpeechBalloon", "caption" => "cc", "system_picture_id" => @sp.id, "settings" => '{}'\r
@panel = FactoryGirl.create :panel, :author_id => @author.id\r
end\r
before do\r
@sb2 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id\r
@speech2 = @sb2.build_speech(\r
- FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)\r
+ FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 100)\r
)\r
@balloon2 = @sb2.build_balloon(\r
- FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id, :updated_at => Time.now + 100)\r
+ FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)\r
)\r
@sb2.boost\r
@sb2.save!\r
@sb3 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id\r
@speech3 = @sb3.build_speech(\r
- FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)\r
+ FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 200)\r
)\r
@balloon3 = @sb3.build_balloon(\r
- FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id, :updated_at => Time.now + 200)\r
+ FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)\r
)\r
@sb3.boost\r
@sb3.save!\r
@sb4 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id\r
@speech4 = @sb4.build_speech(\r
- FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)\r
+ FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 300)\r
)\r
@balloon4 = @sb4.build_balloon(\r
- FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id, :updated_at => Time.now + 300)\r
+ FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)\r
)\r
@sb4.boost\r
@sb4.save!\r
@sb5 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id\r
@speech5 = @sb5.build_speech(\r
- FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)\r
+ FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 400)\r
)\r
@balloon5 = @sb5.build_balloon(\r
- FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id, :updated_at => Time.now + 400)\r
+ FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)\r
)\r
@sb5.boost\r
@sb5.save!\r
before do\r
@sb2 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id\r
@speech2 = @sb2.build_speech(\r
- FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)\r
+ FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 100)\r
)\r
@balloon2 = @sb2.build_balloon(\r
- FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id, :updated_at => Time.now + 100)\r
+ FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)\r
)\r
@sb2.boost\r
@sb2.save!\r
@sb3 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id\r
@speech3 = @sb3.build_speech(\r
- FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)\r
+ FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 200)\r
)\r
@balloon3 = @sb3.build_balloon(\r
- FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id, :updated_at => Time.now + 200)\r
+ FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)\r
)\r
@sb3.boost\r
@sb3.save!\r
@sb4 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id\r
@speech4 = @sb4.build_speech(\r
- FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)\r
+ FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 300)\r
)\r
@balloon4 = @sb4.build_balloon(\r
- FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id, :updated_at => Time.now + 300)\r
+ FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)\r
)\r
@sb4.boost\r
@sb4.save!\r
@sb5 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @speech_balloon_template.id\r
@speech5 = @sb5.build_speech(\r
- FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)\r
+ FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id, :updated_at => Time.now + 400)\r
)\r
@balloon5 = @sb5.build_balloon(\r
- FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id, :updated_at => Time.now + 400)\r
+ FactoryGirl.attributes_for(:balloon, :system_picture_id => @sp.id)\r
)\r
@sb5.boost\r
@sb5.save!\r