diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-08-13 10:42:02 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-08-14 13:15:32 +0200 |
commit | 0deafc0de6c9e80c6272f90127a82bbad5fcacc4 (patch) | |
tree | 6a181cb622b364eb057973e758e70f9b406c6b11 | |
parent | Improve coverage of QuestionCategory model (diff) | |
download | recruiting-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.rb | 13 |
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 |