Sha256: 034c7df3024727d075f833af71ea593a102919a69304b150eed98a7783a6bd46

Contents?: true

Size: 586 Bytes

Versions: 28

Compression:

Stored size: 586 Bytes

Contents

# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx'
require 'stringio'

class TestTableWriteAutoFilter01 < Test::Unit::TestCase
  def setup
    workbook = WriteXLSX.new(StringIO.new)
    @worksheet = workbook.add_worksheet
  end

  def test_table_write_auto_filter
    expected = '<autoFilter ref="C3:F13"/>'

    table = Writexlsx::Package::Table.new(@worksheet, 1, 1, 2, 2)
    table.instance_variable_set(:@autofilter, 'C3:F13')

    table.__send__(:write_auto_filter)
    result = table.instance_variable_get(:@writer).string

    assert_equal(expected, result)
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
write_xlsx-0.86.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.11 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.10 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.9 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.8 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.7 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.6 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.5 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.4 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.3 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.2 test/package/table/test_write_auto_filter.rb
write_xlsx-0.85.1 test/package/table/test_write_auto_filter.rb
write_xlsx-0.83.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.81.1 test/package/table/test_write_auto_filter.rb
write_xlsx-0.81.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.80.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.79.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.78.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.77.2 test/package/table/test_write_auto_filter.rb
write_xlsx-0.77.1 test/package/table/test_write_auto_filter.rb