fix tests

This commit is contained in:
albert
2013-02-18 20:59:45 -05:00
parent 8a46836238
commit e3ddafa265
3 changed files with 19 additions and 17 deletions

View File

@@ -76,7 +76,8 @@ class ForumPostsControllerTest < ActionController::TestCase
context "destroy action" do
should "destroy the posts" do
post :destroy, {:id => @forum_post.id}, {:user_id => @user.id}
CurrentUser.user = @mod
post :destroy, {:id => @forum_post.id}, {:user_id => @mod.id}
assert_redirected_to(forum_post_path(@forum_post))
@forum_post.reload
assert_equal(true, @forum_post.is_deleted?)