+# -*- encoding: utf-8 -*-
+#テストデータ
FactoryGirl.define do
factory :admin, :class => Admin do |admin|
admin.sequence(:email) { |n| "admin#{n}@gmail.com"}
# user.author FactoryGirl.create(:author_yas)
end
+ factory :demand_user, :class => DemandUser do |demand_user|
+ demand_user.sequence(:email) { |n| "hoge#{n}@gmail.com"}
+ demand_user.password "user0100"
+ demand_user.password_confirmation "user0100"
+ # user.author FactoryGirl.create(:author_yas)
+ end
+
factory :author, :class => Author do |author|
author.name 'test'
author.sequence(:user_id) { |n| n}
story.author_id 1
story.t 0
end
+
+ factory :provider, :class => Provider do |provider|
+ provider.name 'admin@penguinkingdom.com'
+ provider.caption 'ペンギン王国'
+ provider.url 'http://localhost:3000/'
+ provider.description 'ペンギン王国はペンギン素材を豊富に用意したペンギンマニアのサイトです。'
+ provider.demander_url 'http://localhost:3000/demanders'
+ provider.provider_status_id 1
+ end
+
+ factory :provider_status, :class => ProviderStatus do |provider_status|
+ provider_status.token nil
+ provider_status.receive_hour1 nil
+ provider_status.receive_hour2 nil
+ provider_status.received_at nil
+ provider_status.stopped_at nil
+ end
+
+ factory :demander, :class => Demander do |demander|
+ demander.demand_user_id 1
+ demander.name 'admin@penguinkingdom.com'
+ demander.caption 'ペンギン王国'
+ demander.url 'http://localhost:3000/'
+ demander.description 'ペンギン王国はペンギン素材を豊富に用意したペンギンマニアのサイトです。'
+ demander.demander_url 'http://localhost:3000/demanders'
+ demander.demander_status_id 1
+ end
+
+ factory :demander_status, :class => DemanderStatus do |demander_status|
+ demander_status.requested_at nil
+ demander_status.rejected_at nil
+ demander_status.approved_at nil
+ demander_status.token nil
+ demander_status.receive_hour1 nil
+ demander_status.receive_hour2 nil
+ end
end