Sha256: 176ec8d10f68ac8b4b96798ad5c3374161e161a7ae4d17be91325663554da5f7
Contents?: true
Size: 926 Bytes
Versions: 9
Compression:
Stored size: 926 Bytes
Contents
require File.expand_path('../../../test_helper', File.dirname(__FILE__)) class Admin::Blog::CommentsControllerTest < ActionController::TestCase def test_get_index get :index assert_response :success assert_template :index assert assigns(:comments) assert !assigns(:post) end def test_get_index_for_post get :index, :post_id => blog_posts(:default) assert_response :success assert_template :index assert assigns(:post) assert assigns(:comments) end def test_publish comment = blog_comments(:default) comment.update_attribute(:is_published, false) xhr :put, :publish, :id => comment assert_response :success comment.reload assert comment.is_published end def test_destroy assert_difference 'Blog::Comment.count', -1 do xhr :delete, :destroy, :id => blog_comments(:default) assert_response :success end end end
Version data entries
9 entries across 9 versions & 1 rubygems