summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-08-12 23:07:54 +0900
committerRandy Morgan <[email protected]>2012-08-12 23:07:54 +0900
commitedc1f5a191d7e2214bb1116f4e6cde442317f662 (patch)
tree79731e9339ee5cda1e6bcb00661deff6a1eda796 /test
parent62ff31c460b22c27213f9555065ff4ce76cc8a63 (diff)
downloadcaxlsx-edc1f5a191d7e2214bb1116f4e6cde442317f662.tar.gz
caxlsx-edc1f5a191d7e2214bb1116f4e6cde442317f662.zip
specs to prove the sz bug is actually fixed.
Diffstat (limited to 'test')
-rw-r--r--test/workbook/worksheet/tc_cell.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_cell.rb b/test/workbook/worksheet/tc_cell.rb
index b91ae3d3..9f425ec7 100644
--- a/test/workbook/worksheet/tc_cell.rb
+++ b/test/workbook/worksheet/tc_cell.rb
@@ -268,6 +268,22 @@ class TestCell < Test::Unit::TestCase
end
+ def test_font_size_with_custom_style_and_no_sz
+ @c.style = @c.row.worksheet.workbook.styles.add_style :bg_color => 'FF00FF'
+ sz = @c.send(:font_size)
+ assert_equal(sz, @c.row.worksheet.workbook.styles.fonts.first.sz)
+ end
+
+ def test_font_size_with_custom_sz
+ @c.style = @c.row.worksheet.workbook.styles.add_style :sz => 52
+ sz = @c.send(:font_size)
+ assert_equal(sz, 52)
+ end
+
+ def test_cell_with_sz
+ @c.sz = 25
+ assert_equal(25, @c.send(:font_size))
+ end
def test_to_xml
# TODO This could use some much more stringent testing related to the xml content generated!
@ws.add_row [Time.now, Date.today, true, 1, 1.0, "text", "=sum(A1:A2)"]