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
4
4
5
5
# configure AjaxDatatablesRails global settings
6
6
# AjaxDatatablesRails.configure do |config|
7
- # config.db_adapter = :pg
7
+ # config.db_adapter = :postgresql
8
8
# end
9
9
def self . configure
10
10
yield @config ||= AjaxDatatablesRails ::Configuration . new
@@ -19,6 +19,6 @@ class Configuration
19
19
include ActiveSupport ::Configurable
20
20
21
21
config_accessor ( :orm ) { :active_record }
22
- config_accessor ( :db_adapter ) { :pg }
22
+ config_accessor ( :db_adapter ) { :postgresql }
23
23
end
24
24
end
Original file line number Diff line number Diff line change 24
24
expect ( config . orm ) . to eq ( :active_record )
25
25
end
26
26
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 )
29
29
end
30
30
end
31
31
Original file line number Diff line number Diff line change 127
127
expect ( column . send ( :typecast ) ) . to eq ( 'VARCHAR' )
128
128
end
129
129
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
+
130
135
it 'returns CHAR if :db_adapter is :mysql2' do
131
136
allow_any_instance_of ( AjaxDatatablesRails ::Configuration ) . to receive ( :db_adapter ) { :mysql2 }
132
137
expect ( column . send ( :typecast ) ) . to eq ( 'CHAR' )
You can’t perform that action at this time.
0 commit comments