diff options
author | 2010-08-13 10:47:54 +0200 | |
---|---|---|
committer | 2010-08-14 13:15:32 +0200 | |
commit | 8f7dc185ca1f3d48cfae5b9c26f3717d0c042fbf (patch) | |
tree | da41acadc6d5d51d76ab1b111e5826e241ab515f | |
parent | Improve coverage of QuestionContentMultipleChoice (diff) | |
download | recruiting-webapp-8f7dc185ca1f3d48cfae5b9c26f3717d0c042fbf.tar.gz recruiting-webapp-8f7dc185ca1f3d48cfae5b9c26f3717d0c042fbf.tar.bz2 recruiting-webapp-8f7dc185ca1f3d48cfae5b9c26f3717d0c042fbf.zip |
Improve coverage of QuestionContentText model
-rw-r--r-- | spec/models/question_content_text_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/question_content_text_spec.rb b/spec/models/question_content_text_spec.rb new file mode 100644 index 0000000..f80a071 --- /dev/null +++ b/spec/models/question_content_text_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper.rb' +describe QuestionContentText do + it "should prepare proper new anser of user" do + recruit = Factory(:recruit) + q = Factory(:question) + Factory(:question_content_text, :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?(Answer).should be_true + end +end |