ambition/spec/factories/projects.rb

15 lines
360 B
Ruby

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