fixes #69: Comment voting non functional

This commit is contained in:
albert
2011-09-14 17:46:42 -04:00
parent fcc6a78fd4
commit 22074eed1f
10 changed files with 73 additions and 31 deletions

View File

@@ -22,8 +22,10 @@ class CommentVotesControllerTest < ActionController::TestCase
should "fail silently on errors" do
Factory.create(:comment_vote, :comment => @comment)
post :create, {:format => "js", :comment_id => @comment.id, :score => 1}, {:user_id => @user.id}
assert_response :error
assert_difference("CommentVote.count", 0) do
post :create, {:format => "js", :comment_id => @comment.id, :score => 1}, {:user_id => @user.id}
assert_response :success
end
end
end
end