Sha256: dcbb48d336402a919c935e0652bf944b7f82db8bd5b553b280416184b91a835f
Contents?: true
Size: 1.11 KB
Versions: 6
Compression:
Stored size: 1.11 KB
Contents
require File.dirname(__FILE__) + '/../../../test/test_helper' require File.dirname(__FILE__) + '/../../spec_helper' require 'comment' require 'trackback' describe Admin::FeedbackController do before do request.session = { :user => users(:tobi).id } end def test_index get :index assert_response :success assert_template 'index' assert_equal Feedback.count, assigns(:feedback).size end def test_list_unconfirmed get :index, :confirmed => 'f' assert_response :success assert_template 'index' Feedback.count(:conditions => { :status_confirmed => false }).should == assigns(:feedback).size end def test_list_spam get :index, :published => 'f' assert_response :success assert_template 'index' Feedback.count(:conditions => { :published => false }).should == assigns(:feedback).size end def test_list_unconfirmed_spam get :index, :published => 'f', :confirmed => 'f' assert_response :success assert_template 'index' Feedback.count(:conditions => { :published => false, :status_confirmed => false }).should == assigns(:feedback).size end end
Version data entries
6 entries across 6 versions & 1 rubygems