summaryrefslogtreecommitdiff
path: root/db/fixtures
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-10-30 09:22:24 +0200
committerrandx <dmitriy.zaporozhets@gmail.com>2012-10-30 09:22:24 +0200
commite4cf99db4615f406dfc60bfc8bca473581b4f910 (patch)
tree4a4f21195fc94d6aa007e93d7a7193597195fa6e /db/fixtures
parent53a3be03fc5a118991eb3903c1e763135187ef3c (diff)
downloadgitlab-ce-e4cf99db4615f406dfc60bfc8bca473581b4f910.tar.gz
Refactor milestones related functionality. Added seeds for Milestine and MR
Diffstat (limited to 'db/fixtures')
-rw-r--r--db/fixtures/development/007_milestones.rb13
-rw-r--r--db/fixtures/development/008_merge_requests.rb19
2 files changed, 32 insertions, 0 deletions
diff --git a/db/fixtures/development/007_milestones.rb b/db/fixtures/development/007_milestones.rb
new file mode 100644
index 00000000000..a77f619f995
--- /dev/null
+++ b/db/fixtures/development/007_milestones.rb
@@ -0,0 +1,13 @@
+Milestone.seed(:id, [
+ { :id => 1, :project_id => 1, :title => 'v' + Faker::Address.zip_code },
+ { :id => 2, :project_id => 1, :title => 'v' + Faker::Address.zip_code },
+ { :id => 3, :project_id => 1, :title => 'v' + Faker::Address.zip_code },
+ { :id => 4, :project_id => 2, :title => 'v' + Faker::Address.zip_code },
+ { :id => 5, :project_id => 2, :title => 'v' + Faker::Address.zip_code },
+
+ { :id => 6, :project_id => 2, :title => 'v' + Faker::Address.zip_code },
+ { :id => 7, :project_id => 2, :title => 'v' + Faker::Address.zip_code },
+ { :id => 8, :project_id => 3, :title => 'v' + Faker::Address.zip_code },
+ { :id => 9, :project_id => 3, :title => 'v' + Faker::Address.zip_code },
+ { :id => 11, :project_id => 3, :title => 'v' + Faker::Address.zip_code },
+])
diff --git a/db/fixtures/development/008_merge_requests.rb b/db/fixtures/development/008_merge_requests.rb
new file mode 100644
index 00000000000..6e0d67c421b
--- /dev/null
+++ b/db/fixtures/development/008_merge_requests.rb
@@ -0,0 +1,19 @@
+MergeRequest.seed(:id, [
+ { :id => 1, milestone_id: 1, project_id: 1, source_branch: 'master', target_branch: 'feature', author_id: 1, assignee_id: 1, title: Faker::Lorem.sentence(6) },
+ { :id => 2, milestone_id: 1, project_id: 1, source_branch: 'master', target_branch: 'feature', author_id: 2, assignee_id: 2, title: Faker::Lorem.sentence(6) },
+ { :id => 3, milestone_id: 1, project_id: 1, source_branch: 'master', target_branch: 'feature', author_id: 3, assignee_id: 3, title: Faker::Lorem.sentence(6) },
+ { :id => 4, milestone_id: 1, project_id: 1, source_branch: 'master', target_branch: 'feature', author_id: 4, assignee_id: 4, title: Faker::Lorem.sentence(6) },
+ { :id => 5, milestone_id: 1, project_id: 1, source_branch: 'master', target_branch: 'feature', author_id: 5, assignee_id: 5, title: Faker::Lorem.sentence(6) },
+
+ { :id => 6, milestone_id: 5, project_id: 2, source_branch: 'master', target_branch: 'feature', author_id: 1, assignee_id: 1, title: Faker::Lorem.sentence(6) },
+ { :id => 7, milestone_id: 6, project_id: 2, source_branch: 'master', target_branch: 'feature', author_id: 2, assignee_id: 2, title: Faker::Lorem.sentence(6) },
+ { :id => 8, milestone_id: 6, project_id: 2, source_branch: 'master', target_branch: 'feature', author_id: 3, assignee_id: 3, title: Faker::Lorem.sentence(6) },
+ { :id => 9, milestone_id: 6, project_id: 2, source_branch: 'master', target_branch: 'feature', author_id: 4, assignee_id: 4, title: Faker::Lorem.sentence(6) },
+ { :id => 11, milestone_id: 5, project_id: 2, source_branch: 'master', target_branch: 'feature', author_id: 5, assignee_id: 5, title: Faker::Lorem.sentence(6) },
+
+ { :id => 12, milestone_id: 9, project_id: 3, source_branch: 'master', target_branch: 'feature', author_id: 1, assignee_id: 1, title: Faker::Lorem.sentence(6)},
+ { :id => 13, milestone_id: 9, project_id: 3, source_branch: 'master', target_branch: 'feature', author_id: 2, assignee_id: 2, title: Faker::Lorem.sentence(6)},
+ { :id => 14, milestone_id: 9, project_id: 3, source_branch: 'master', target_branch: 'feature', author_id: 3, assignee_id: 3, title: Faker::Lorem.sentence(6)},
+ { :id => 15, milestone_id: 9, project_id: 3, source_branch: 'master', target_branch: 'feature', author_id: 4, assignee_id: 4, title: Faker::Lorem.sentence(6)},
+ { :id => 16, milestone_id: 9, project_id: 3, source_branch: 'master', target_branch: 'feature', author_id: 5, assignee_id: 5, title: Faker::Lorem.sentence(6)},
+])