Sha256: 00373fadb898230c8dca83822847fd24017a9bb1e5a7f14eb6ab8890f0aa819c
Contents?: true
Size: 1.13 KB
Versions: 28
Compression:
Stored size: 1.13 KB
Contents
require File.expand_path('../../../spec_helper', __FILE__) describe Admin::AssetsController do dataset :users, :assets before :each do ActionController::Routing::Routes.reload login_as :designer end it "should be a ResourceController" do controller.should be_kind_of(Admin::ResourceController) end it "should handle Assets" do controller.class.model_class.should == Asset end describe "index" do describe "before filtration" do before do get :index end it "should render the index view" do response.should be_success response.should render_template('index') end end describe "on ajax filtration" do before do xml_http_request :get, :index, :filter => ['video'] end it "should render the table partial" do response.body.should_not have_text('<head>') response.content_type.should == 'text/javascript' response.should_not render_template('index') response.should render_template('admin/assets/_asset_table') assigns(:assets).should include(assets(:video)) end end end end
Version data entries
28 entries across 28 versions & 4 rubygems