Sha256: 48cef888c4afec787f06cea8b37485e3b38547bed46b6c2582b34de8410678b7
Contents?: true
Size: 1.25 KB
Versions: 8
Compression:
Stored size: 1.25 KB
Contents
require File.dirname(__FILE__) + "/../../spec_helper" describe Admin::UsersController do it "should be paginated" do Admin::UsersController.paginated.should be_true controller.paginated?.should be_true end ## I need to redo these with mock classes # # describe "with pagination settings from paginate_models" do # it "should override defaults" do # Radiant.config['admin.pagination.per_page'] = "" # Admin::UsersController.send :paginate_models, {:per_page => 5, :inner_window => 12} # controller.pagination_parameters.should == {:page => 1, :per_page => 5} # controller.will_paginate_options.should == {:inner_window => 12, :param_name => :p} # end # end # # describe "with configured pagination settings" do # it "should override defaults" do # Radiant.config['admin.pagination.per_page'] = 23 # controller.pagination_parameters.should == {:page => 1, :per_page => 23} # end # end # describe "without configuration" do it "should have pagination defaults" do Radiant.config['admin.pagination.per_page'] = nil controller.pagination_parameters.should == {:page => 1, :per_page => 50} controller.will_paginate_options.should == {:param_name => :p} end end end
Version data entries
8 entries across 8 versions & 1 rubygems