aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-08-06 18:20:35 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-08-09 18:01:06 +0200
commitde786f350786a22e96a028f141d819d0bf574528 (patch)
treee65f3a783e2d8a462901831f5ea9f4e0a6e973a2 /features
parentAdd :null => false to required fields and relations in models. (diff)
downloadrecruiting-webapp-de786f350786a22e96a028f141d819d0bf574528.tar.gz
recruiting-webapp-de786f350786a22e96a028f141d819d0bf574528.tar.bz2
recruiting-webapp-de786f350786a22e96a028f141d819d0bf574528.zip
Bugfix - previous commit was tested unproperly and introduced some bugs
Answer can't enforce :null=>false on content field of answer because when user answers multiple choice question and selects no options his/her answer will have empty content field.
Diffstat (limited to 'features')
-rw-r--r--features/step_definitions/multiple_choice_question_steps.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/features/step_definitions/multiple_choice_question_steps.rb b/features/step_definitions/multiple_choice_question_steps.rb
index e44d7f2..5b3fa7a 100644
--- a/features/step_definitions/multiple_choice_question_steps.rb
+++ b/features/step_definitions/multiple_choice_question_steps.rb
@@ -1,7 +1,7 @@
Given /^a multiple choice content "([^\"]*)"$/ do |content|
@content = QuestionContentMultipleChoice.find_by_content(content)
if @content.nil?
- @content = QuestionContentMultipleChoice.create! :content => content
+ @content = QuestionContentMultipleChoice.create! :content => content, :question_id => 1
end
end