aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-08-13 10:42:02 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-08-14 13:15:32 +0200
commit0deafc0de6c9e80c6272f90127a82bbad5fcacc4 (patch)
tree6a181cb622b364eb057973e758e70f9b406c6b11
parentImprove coverage of QuestionCategory model (diff)
downloadrecruiting-webapp-0deafc0de6c9e80c6272f90127a82bbad5fcacc4.tar.gz
recruiting-webapp-0deafc0de6c9e80c6272f90127a82bbad5fcacc4.tar.bz2
recruiting-webapp-0deafc0de6c9e80c6272f90127a82bbad5fcacc4.zip
Improve coverage of QuestionContentMultipleChoice
-rw-r--r--spec/models/question_content_multiple_choice_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/question_content_multiple_choice_spec.rb b/spec/models/question_content_multiple_choice_spec.rb
new file mode 100644
index 0000000..fbe0323
--- /dev/null
+++ b/spec/models/question_content_multiple_choice_spec.rb
@@ -0,0 +1,13 @@
+require 'spec_helper.rb'
+describe QuestionContentMultipleChoice do
+ it "should prepare proper new answer of user" do
+ recruit = Factory(:recruit)
+ q = Factory(:question)
+ Factory(:question_content_multiple_choice, :question => q)
+ q.reload
+ ans = q.content.new_answer_of(recruit)
+ ans.owner_is?(recruit).should be_true
+ ans.question_is?(q).should be_true
+ ans.is_a?(MultipleChoiceAnswer).should be_true
+ end
+end