Skip to content

Commit 035f9fd

Browse files
committed
Updated options in specs
1 parent 9528c02 commit 035f9fd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

spec/adapters/datatables_spec.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
@data_vec1 = Daru::Vector.new([1 ,2, 4], name: :a)
77
@data_vec2 = Daru::Vector.new([15 ,30, 40])
88
@data_df = Daru::DataFrame.new(arr1: @data_vec1, arr2: @data_vec2)
9-
@options = {width: 800, height: 720}
9+
@options = {scrollX: true}
1010

1111
@plot = Daru::View::Table.new(@data_df, @options)
1212
end
13-
let(:options) {{width: 800, height: 720}}
13+
let(:options) {{scrollX: true}}
1414
let(:string_array) {["daru", "view"]}
1515
let(:data_array) {[[1, 15], [2, 30], [4, 40]]}
1616
let(:table_string_array) { Daru::View::Table.new(string_array, options) }
@@ -52,7 +52,7 @@
5252
it 'generates valid script and table' do
5353
expect(js).to match(/DataTable/)
5454
expect(js).to match(
55-
/width: 800, height: 720, data: \[\[0,1,15\],\[1,2,30\],\[2,4,40\]\]/
55+
/scrollX: true, data: \[\[0,1,15\],\[1,2,30\],\[2,4,40\]\]/
5656
)
5757
expect(js).to match(/<th><\/th>/i)
5858
expect(js).to match(/<th>arr1<\/th>/i)
@@ -66,7 +66,7 @@
6666
it 'generates valid script and table' do
6767
expect(js).to match(/DataTable/)
6868
expect(js).to match(
69-
/width: 800, height: 720, data: \[\[0,1\],\[1,2\],\[2,4\]\]/
69+
/scrollX: true, data: \[\[0,1\],\[1,2\],\[2,4\]\]/
7070
)
7171
expect(js).to match(/<th> <\/th>/i)
7272
expect(js).to match(/<th>a<\/th>/i)
@@ -80,7 +80,7 @@
8080
it 'generates valid script and table' do
8181
expect(js).to match(/DataTable/)
8282
expect(js).to match(
83-
/width: 800, height: 720, data: \[\[0,"daru"\],\[1,"view"\]\]/
83+
/scrollX: true, data: \[\[0,"daru"\],\[1,"view"\]\]/
8484
)
8585
expect(js).to match(/<th><\/th>/i)
8686
expect(js).to match(/<th>Column: 0<\/th>/i)
@@ -94,7 +94,7 @@
9494
it 'generates valid script and table' do
9595
expect(js).to match(/DataTable/)
9696
expect(js).to match(
97-
/width: 800, height: 720, data: \[\[0,"daru"\],\[1,"view"\]\]/
97+
/scrollX: true, data: \[\[0,"daru"\],\[1,"view"\]\]/
9898
)
9999
expect(js).to match(/<th><\/th>/i)
100100
expect(js).to match(/<th>Column: 0<\/th>/i)
@@ -128,7 +128,7 @@
128128
/data_array = \[\[0, 0\], \[1, 1\], \[2, 2\]/
129129
)
130130
expect(content).to match(
131-
/width: 800, height: 720, serverSide: true, ajax:/
131+
/scrollX: true, serverSide: true, ajax:/
132132
)
133133
expect(content).to match(
134134
/function \( data, callback, settings \) {/)
@@ -159,7 +159,7 @@
159159
it "writes client side html code of the DataTable to the file" do
160160
expect(content).to match(/DataTable/)
161161
expect(content).to match(
162-
/width: 800, height: 720, data: \[\[0,1,15\],\[1,2,30\],\[2,4,40\]\]/
162+
/scrollX: true, data: \[\[0,1,15\],\[1,2,30\],\[2,4,40\]\]/
163163
)
164164
end
165165
it "generates a table" do

0 commit comments

Comments
 (0)