gitlab-org--gitlab-foss/db/fixtures/development/07_milestones.rb
Stan Hu 8536dedbb1 Fix seed_fu failure with inserting milestones into test DB
Milestones were not being saved due to "invalid state" validation errors
2016-04-10 06:39:42 -07:00

16 lines
378 B
Ruby

Gitlab::Seeder.quiet do
Project.all.each do |project|
5.times do |i|
milestone_params = {
title: "v#{i}.0",
description: FFaker::Lorem.sentence,
state: [:active, :closed].sample,
}
milestone = Milestones::CreateService.new(
project, project.team.users.sample, milestone_params).execute
print '.'
end
end
end