Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (32 sloc) 1.25 KB
require File.dirname(__FILE__) + "/../../spec_helper"
describe Radiant::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.detail['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.detail['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.detail['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
Something went wrong with that request. Please try again.