ambition/spec/factories/projects.rb

15 lines
360 B
Ruby
Raw Normal View History

2016-12-11 17:40:47 +08:00
FactoryGirl.define do
factory :project do
name { Faker::Name.title }
sequence(:content){ |n| "This is project content#{n}"}
after(:build) do |project|
3.times { project.users << FactoryGirl.create(:user_with_sequence_number) }
end
factory :project_name_length_gt_20 do
name { generateRandomString(51, 51)}
end
end
end