From 4d4ae4b443cf4b5a2398fb9d84ad768ea9c1e87e Mon Sep 17 00:00:00 2001 From: albert Date: Fri, 11 May 2012 18:26:14 -0400 Subject: [PATCH] tests --- test/unit/comment_test.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/unit/comment_test.rb b/test/unit/comment_test.rb index f051f64a9..a6b48d7cd 100644 --- a/test/unit/comment_test.rb +++ b/test/unit/comment_test.rb @@ -64,14 +64,15 @@ class CommentTest < ActiveSupport::TestCase user = Factory.create(:user) post = Factory.create(:post) c1 = Factory.create(:comment, :post => post) - comment_vote = c1.vote!(true) + comment_vote = c1.vote!("up") assert_equal([], comment_vote.errors.full_messages) - comment_vote = c1.vote!(true) + comment_vote = c1.vote!("up") assert_equal(["User has already voted for this comment"], comment_vote.errors.full_messages) assert_equal(1, CommentVote.count) + assert_equal(1, CommentVote.last.score) c2 = Factory.create(:comment, :post => post) - comment_vote = c2.vote!(true) + comment_vote = c2.vote!("up") assert_equal([], comment_vote.errors.full_messages) assert_equal(2, CommentVote.count) end