aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-06-21 20:18:01 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-06-24 22:32:31 +0200
commitb4b79eb787e33d8617cc2a13b0c678e76622f116 (patch)
treeef73cfc83c85205b2085e729f6dacb5f17705643 /db
parentShow recruits with all questions answered (diff)
downloadrecruiting-webapp-b4b79eb787e33d8617cc2a13b0c678e76622f116.tar.gz
recruiting-webapp-b4b79eb787e33d8617cc2a13b0c678e76622f116.tar.bz2
recruiting-webapp-b4b79eb787e33d8617cc2a13b0c678e76622f116.zip
Seed with user with some unanswered questions.
Diffstat (limited to 'db')
-rw-r--r--db/seeds.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/seeds.rb b/db/seeds.rb
index d0fd101..ce461bd 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -94,10 +94,16 @@ advanced = User.create! :email_address => 'advanced@recruits.org',
:name => 'Advanced Recruit', :role => :recruit, :password => 'secret',
:password_confirmation => 'secret', :mentor => mentor
+# Recruit - some questions answered
+recruit_mid = User.create! :email_address => 'recruit-mid@recruits.org',
+ :name => 'Recruit in middle of ebuild quizz', :role => :recruit, :password => 'secret',
+ :password_confirmation => 'secret', :mentor => mentor
+
# Categories for users
UserCategory.create! [{:question_category => ebuild, :user => mentor},
{:question_category => mentoring, :user => mentor},
{:question_category => ebuild, :user => recruit},
+ {:question_category => ebuild, :user => recruit_mid},
{:question_category => ebuild, :user => advanced},
{:question_category => mentoring, :user => advanced}]
@@ -114,6 +120,7 @@ end
# non-approved answers
ans_hash = {:content => 'Some answer'}
answer_many [recruit], [ebuild_q1, ebuild_q2, ebuild_q3], ans_hash
+answer_many [recruit_mid], [ebuild_q1, ebuild_q2], ans_hash
answer_many [advanced], [mentor_q1, mentor_q2, mentor_q3], ans_hash
# approved answers