fixed tests

This commit is contained in:
albert
2012-03-12 18:22:44 -04:00
parent dd5a965884
commit 9fb0f16f01
3 changed files with 42 additions and 9 deletions

View File

@@ -44,7 +44,14 @@ class ForumTopicsController < ApplicationController
def destroy
@forum_topic = ForumTopic.find(params[:id])
check_privilege(@forum_topic)
@forum_topic.destroy
@forum_topic.update_attribute(:is_deleted, true)
respond_with(@forum_topic)
end
def undelete
@forum_topic = ForumTopic.find(params[:id])
check_privilege(@forum_topic)
@forum_topic.update_attribute(:is_deleted, false)
respond_with(@forum_topic)
end