diff options
| author | Scott <[email protected]> | 2012-04-06 07:27:29 -0400 |
|---|---|---|
| committer | Scott <[email protected]> | 2012-04-06 07:27:29 -0400 |
| commit | 89f5b16ae10295e93cd976bc79eec3b8e5902cb8 (patch) | |
| tree | a62f4b690c4c30fc9a2d207876895bfe07d3ec29 /test/stylesheet | |
| parent | 71859909ed45618cd57ec82bb6781f062d188b6d (diff) | |
| download | caxlsx-89f5b16ae10295e93cd976bc79eec3b8e5902cb8.tar.gz caxlsx-89f5b16ae10295e93cd976bc79eec3b8e5902cb8.zip | |
Add edges() to border to return list of applied edges
Add border edge tests to styles spec
Diffstat (limited to 'test/stylesheet')
| -rw-r--r-- | test/stylesheet/tc_styles.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb index ef14e151..42c64eee 100644 --- a/test/stylesheet/tc_styles.rb +++ b/test/stylesheet/tc_styles.rb @@ -23,7 +23,15 @@ class TestStyles < Test::Unit::TestCase assert_equal(@styles.borders.size, border_count + 1) assert_equal(@styles.borders.last.prs.last.color.rgb, "FFFF0000") assert_raise(ArgumentError) { @styles.add_style :border => {:color => "FFFF0000"} } + [:top,:bottom,:left,:right].each {|edge| assert(@styles.borders.last.edges.include?(edge))} + s2 = @styles.add_style :border => {:style=>:thin, :color => "0000FFFF", :edges => [:top, :bottom]} + assert_equal(@styles.borders.size, border_count + 2) + assert_equal(@styles.borders.last.prs.last.color.rgb, "0000FFFF") + assert(@styles.borders.last.edges.include?(:top)) + assert(@styles.borders.last.edges.include?(:bottom)) + assert(! @styles.borders.last.edges.include?(:left)) + assert(! @styles.borders.last.edges.include?(:right)) end def test_add_style |
