diff options
| author | Randy Morgan <[email protected]> | 2012-04-27 20:06:50 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-04-27 20:06:50 +0900 |
| commit | b7da0f92d1eebaa1cd97423e4bb634fd89c78f90 (patch) | |
| tree | f070d4cc01adb1305b99522246db9d137839c80c /test/workbook/worksheet/tc_row.rb | |
| parent | 956117947416cba4ce21737ae0c2a431e4865b8e (diff) | |
| download | caxlsx-b7da0f92d1eebaa1cd97423e4bb634fd89c78f90.tar.gz caxlsx-b7da0f92d1eebaa1cd97423e4bb634fd89c78f90.zip | |
test to ensure that add_cell properly updates worksheet column widths.
Diffstat (limited to 'test/workbook/worksheet/tc_row.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_row.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_row.rb b/test/workbook/worksheet/tc_row.rb index a6b4c74a..f9765a7f 100644 --- a/test/workbook/worksheet/tc_row.rb +++ b/test/workbook/worksheet/tc_row.rb @@ -49,6 +49,12 @@ class TestRow < Test::Unit::TestCase assert_equal(@row.cells.last, c) end + def test_add_cell_autowidth_info + width = @ws.send :calculate_width, 'this is the cell of cells', @ws.workbook.styles.fonts.first.sz + c = @row.add_cell("this is the cell of cells") + assert_equal(@ws.column_info.last.width, width) + end + def test_array_to_cells r = @ws.add_row [1,2,3], :style=>1, :types=>[:integer, :string, :float] assert_equal(r.cells.size, 3) |
