Sha256: b576be24c0bf68e180e2031d45c00786fdd285032386ce3fbc8daa7016d02917

Contents?: true

Size: 647 Bytes

Versions: 12

Compression:

Stored size: 647 Bytes

Contents

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

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

  def test_set_column_with_level_minus
    level = -1
    @worksheet.set_column('B:G', nil, nil, 0, level)
    result = @worksheet.instance_variable_get(:@colinfo).first[5]
    assert_equal(0, result)
  end

  def test_set_column_with_level_8
    level = 8
    @worksheet.set_column('B:G', nil, nil, 0, level)
    result = @worksheet.instance_variable_get(:@colinfo).first[5]
    assert_equal(7, result)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
write_xlsx-0.75.0 test/worksheet/test_set_column.rb
write_xlsx-0.74.0 test/worksheet/test_set_column.rb
write_xlsx-0.73.0 test/worksheet/test_set_column.rb
write_xlsx-0.72.3.beta1 test/worksheet/test_set_column.rb
write_xlsx-0.72.2 test/worksheet/test_set_column.rb
write_xlsx-0.72.1 test/worksheet/test_set_column.rb
write_xlsx-0.72.0 test/worksheet/test_set_column.rb
write_xlsx-0.71.0 test/worksheet/test_set_column.rb
write_xlsx-0.70.0 test/worksheet/test_set_column.rb
write_xlsx-0.69.0 test/worksheet/test_set_column.rb
write_xlsx-0.65.1 test/worksheet/test_set_column.rb
write_xlsx-0.65.0 test/worksheet/test_set_column.rb