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 58efd2c commit 11e4890Copy full SHA for 11e4890
spec/ajax-datatables-rails/base_spec.rb
@@ -139,6 +139,18 @@ def paginate_records(records)
139
datatable.new(sample_params)
140
end
141
142
+ describe '#fetch_records' do
143
+ it 'calls #get_raw_records' do
144
+ expect(datatable).to receive(:get_raw_records) { User.all }
145
+ datatable.fetch_records
146
+ end
147
+
148
+ it 'returns a collection of records' do
149
150
+ expect(datatable.fetch_records).to be_a(ActiveRecord::Relation)
151
152
153
154
describe '#filter_records' do
155
it {
156
expect { datatable.filter_records([]) }.to raise_error(NotImplementedError).with_message('FOO')
spec/ajax-datatables-rails/orm/active_record_spec.rb
0 commit comments