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.77.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.76.3 test/package/table/test_write_auto_filter.rb
write_xlsx-0.76.2 test/package/table/test_write_auto_filter.rb
write_xlsx-0.76.1 test/package/table/test_write_auto_filter.rb
write_xlsx-0.76.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.75.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.74.0 test/package/table/test_write_auto_filter.rb
write_xlsx-0.73.0 test/package/table/test_write_auto_filter.rb