diff options
| author | 2017-06-12 03:37:11 -0400 | |
|---|---|---|
| committer | 2017-06-12 03:37:11 -0400 | |
| commit | 8280a21a23d44aa90177e2bc041d0b8dc8556f4b (patch) | |
| tree | dadef7ee085c0e990a5070bd41b6a5b98c97f4fd /test/excelx/cell/test_boolean.rb | |
Import Upstream version 2.7.1upstream/2.7.1
Diffstat (limited to 'test/excelx/cell/test_boolean.rb')
| -rw-r--r-- | test/excelx/cell/test_boolean.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/excelx/cell/test_boolean.rb b/test/excelx/cell/test_boolean.rb new file mode 100644 index 0000000..5087db2 --- /dev/null +++ b/test/excelx/cell/test_boolean.rb @@ -0,0 +1,36 @@ +require 'test_helper' + +class TestRooExcelxCellNumber < Minitest::Test + def boolean + Roo::Excelx::Cell::Boolean + end + + def test_formatted_value + cell = boolean.new '1', nil, nil, nil, nil + assert_equal 'TRUE', cell.formatted_value + + cell = boolean.new '0', nil, nil, nil, nil + assert_equal 'FALSE', cell.formatted_value + end + + def test_to_s + cell = boolean.new '1', nil, nil, nil, nil + assert_equal 'TRUE', cell.to_s + + cell = boolean.new '0', nil, nil, nil, nil + assert_equal 'FALSE', cell.to_s + end + + def test_cell_value + cell = boolean.new '1', nil, nil, nil, nil + assert_equal '1', cell.cell_value + end + + def test_value + cell = boolean.new '1', nil, nil, nil, nil + assert_equal true, cell.value + + cell = boolean.new '0', nil, nil, nil, nil + assert_equal false, cell.value + end +end |
