diff options
Diffstat (limited to 'test/workbook/worksheet/tc_row.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_row.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_row.rb b/test/workbook/worksheet/tc_row.rb index 43e7d23f..f909129c 100644 --- a/test/workbook/worksheet/tc_row.rb +++ b/test/workbook/worksheet/tc_row.rb @@ -60,6 +60,23 @@ class TestRow < Test::Unit::TestCase end + def test_array_to_cells_with_escape_formulas + row = ['=HYPERLINK("http://www.example.com", "CSV Payload")', '=Bar'] + @ws.add_row row, escape_formulas: true + + assert_equal @ws.rows.last.cells[0].escape_formulas, true + assert_equal @ws.rows.last.cells[1].escape_formulas, true + end + + def test_array_to_cells_with_escape_formulas_as_an_array + row = ['=HYPERLINK("http://www.example.com", "CSV Payload")', '+Foo', '-Bar'] + @ws.add_row row, escape_formulas: [true, false, true] + + assert_equal @ws.rows.last.cells.first.escape_formulas, true + assert_equal @ws.rows.last.cells[1].escape_formulas, false + assert_equal @ws.rows.last.cells[2].escape_formulas, true + end + def test_custom_height @row.height = 20 assert(@row.custom_height) |
