diff options
| author | Randy Morgan <[email protected]> | 2012-06-11 08:45:37 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-06-11 08:45:37 +0900 |
| commit | 68f0b530e2260ceacf2ed916e216eaec5da60945 (patch) | |
| tree | 63045ae99fc3abd33e4fde341f73e86af6655969 /test/drawing | |
| parent | e693d2b1933797e18cc1cdd3cba793630e8ecb25 (diff) | |
| download | caxlsx-68f0b530e2260ceacf2ed916e216eaec5da60945.tar.gz caxlsx-68f0b530e2260ceacf2ed916e216eaec5da60945.zip | |
add title object to axis.
Diffstat (limited to 'test/drawing')
| -rw-r--r-- | test/drawing/tc_axis.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/drawing/tc_axis.rb b/test/drawing/tc_axis.rb index 77eb61a1..46c8c956 100644 --- a/test/drawing/tc_axis.rb +++ b/test/drawing/tc_axis.rb @@ -2,8 +2,9 @@ require 'tc_helper.rb' class TestAxis < Test::Unit::TestCase def setup - @axis = Axlsx::Axis.new 12345, 54321, :gridlines => false + @axis = Axlsx::Axis.new 12345, 54321, :gridlines => false, :title => 'Foo' end + def teardown end @@ -14,6 +15,7 @@ class TestAxis < Test::Unit::TestCase assert_equal(@axis.crosses, :autoZero, "tick label position default incorrect") assert(@axis.scaling.is_a?(Axlsx::Scaling) && @axis.scaling.orientation == :minMax, "scaling default incorrect") assert_raise(ArgumentError) { Axlsx::Axis.new( -1234, 'abcd') } + assert_equal('Foo', @axis.title.text) end def test_axis_position @@ -57,6 +59,6 @@ class TestAxis < Test::Unit::TestCase assert(doc.xpath("//c:crosses[@val='#{@axis.crosses.to_s}']")) assert(doc.xpath("//c:crossAx[@val='#{@axis.crossAx.to_s}']")) assert(doc.xpath("//a:bodyPr[@rot='#{@axis.label_rotation.to_s}']")) - + assert(doc.xpath("//a:t[text()='Foo']")) end end |
