fixed comment vote functional test
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
class CommentVotesController < ApplicationController
|
||||
rescue_from CommentVote::Error, :with => :error
|
||||
|
||||
def create
|
||||
@comment = Comment.find(params[:comment_id])
|
||||
@comment.vote!(params[:score])
|
||||
rescue CommentVote::Error => x
|
||||
@error = x
|
||||
render :nothing => true
|
||||
end
|
||||
|
||||
private
|
||||
def error(exception)
|
||||
@exception = exception
|
||||
render :action => "error", :status => 500
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user