We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad9e292 commit caaa96fCopy full SHA for caaa96f
spec/ajax-datatables-rails/orm/active_record_sort_records_spec.rb
@@ -33,8 +33,13 @@
33
it 'should not sort a column which is not orderable' do
34
datatable.params[:order]['0'] = { column: '0', dir: 'asc' }
35
datatable.params[:order]['1'] = { column: '4', dir: 'desc' }
36
+
37
+ expect(datatable.sort_records(records).to_sql).to include(
38
+ 'ORDER BY users.username ASC'
39
+ )
40
41
expect(datatable.sort_records(records).to_sql).to_not include(
- 'ORDER BY users.username ASC, users.post_id DESC'
42
+ 'users.post_id DESC'
43
)
44
end
45
0 commit comments