File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
lib/ajax-datatables-rails
spec/ajax-datatables-rails Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ module AjaxDatatablesRails
44
55 # configure AjaxDatatablesRails global settings
66 # AjaxDatatablesRails.configure do |config|
7- # config.db_adapter = :pg
7+ # config.db_adapter = :postgresql
88 # end
99 def self . configure
1010 yield @config ||= AjaxDatatablesRails ::Configuration . new
@@ -19,6 +19,6 @@ class Configuration
1919 include ActiveSupport ::Configurable
2020
2121 config_accessor ( :orm ) { :active_record }
22- config_accessor ( :db_adapter ) { :pg }
22+ config_accessor ( :db_adapter ) { :postgresql }
2323 end
2424end
Original file line number Diff line number Diff line change 2424 expect ( config . orm ) . to eq ( :active_record )
2525 end
2626
27- it 'default db_adapter should :pg ( postgresql) ' do
28- expect ( config . db_adapter ) . to eq ( :pg )
27+ it 'default db_adapter should :postgresql' do
28+ expect ( config . db_adapter ) . to eq ( :postgresql )
2929 end
3030 end
3131
Original file line number Diff line number Diff line change 127127 expect ( column . send ( :typecast ) ) . to eq ( 'VARCHAR' )
128128 end
129129
130+ it 'returns VARCHAR if :db_adapter is :postgre' do
131+ allow_any_instance_of ( AjaxDatatablesRails ::Configuration ) . to receive ( :db_adapter ) { :postgresql }
132+ expect ( column . send ( :typecast ) ) . to eq ( 'VARCHAR' )
133+ end
134+
130135 it 'returns CHAR if :db_adapter is :mysql2' do
131136 allow_any_instance_of ( AjaxDatatablesRails ::Configuration ) . to receive ( :db_adapter ) { :mysql2 }
132137 expect ( column . send ( :typecast ) ) . to eq ( 'CHAR' )
You can’t perform that action at this time.
0 commit comments