8000 Cleanup tests on column#formater method · GUI/ajax-datatables-rails@edf7a17 · GitHub
[go: up one dir, main page]

Skip to content

Commit edf7a17

Browse files
author
Nicolas Rodriguez
committed
Cleanup tests on column#formater method
1 parent 1f62151 commit edf7a17

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

spec/ajax-datatables-rails/datatable/column_spec.rb

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -80,30 +80,11 @@
8080
end
8181
end
8282

83-
describe 'last_name column' do
84-
let(:column) { datatable.datatable.columns.last }
83+
describe '#formater' do
84+
let(:column) { datatable.datatable.columns.find { |c| c.data == 'last_name' } }
8585

86-
before do
87-
datatable.params[:columns] = {'0'=>{'data'=>'last_name', 'name'=>'', 'searchable'=>'true', 'orderable'=>'true', 'search'=>{'value'=>'', 'regex'=>'false'}}}
88-
end
89-
90-
it 'should be orderable' do
91-
expect(column.orderable?).to eq(true)
92-
end
93-
94-
it 'should be searchable' do
95-
expect(column.searchable?).to eq(true)
96-
end
97-
98-
it 'should have connected to id column' do
99-
expect(column.data).to eq('last_name')
100-
end
101-
102-
describe '#formater' do
103-
it 'should be a proc' do
104-
expect(column.formater).to be_a(Proc)
105-
end
86+
it 'should be a proc' do
87+
expect(column.formater).to be_a(Proc)
10688
end
10789
end
108-
10990
end

0 commit comments

Comments
 (0)
0