diff options
Diffstat (limited to 'test/drawing')
| -rw-r--r-- | test/drawing/tc_cat_axis.rb | 1 | ||||
| -rw-r--r-- | test/drawing/tc_d_lbls.rb | 1 | ||||
| -rw-r--r-- | test/drawing/tc_drawing.rb | 2 | ||||
| -rw-r--r-- | test/drawing/tc_picture_locking.rb | 1 | ||||
| -rw-r--r-- | test/drawing/tc_scatter_chart.rb | 1 | ||||
| -rw-r--r-- | test/drawing/tc_val_axis.rb | 1 | ||||
| -rw-r--r-- | test/drawing/tc_vml_shape.rb | 2 |
7 files changed, 9 insertions, 0 deletions
diff --git a/test/drawing/tc_cat_axis.rb b/test/drawing/tc_cat_axis.rb index ac690336..b020fc53 100644 --- a/test/drawing/tc_cat_axis.rb +++ b/test/drawing/tc_cat_axis.rb @@ -4,6 +4,7 @@ class TestCatAxis < Test::Unit::TestCase def setup @axis = Axlsx::CatAxis.new end + def teardown end diff --git a/test/drawing/tc_d_lbls.rb b/test/drawing/tc_d_lbls.rb index d5474131..60efeb7b 100644 --- a/test/drawing/tc_d_lbls.rb +++ b/test/drawing/tc_d_lbls.rb @@ -31,6 +31,7 @@ class TestDLbls < Test::Unit::TestCase end assert_equal(:t, d_lbls.d_lbl_pos, "d_lbl_pos set by options") end + def test_d_lbl_pos assert_raise(ArgumentError, 'invlaid label positions are rejected') { @d_lbls.d_lbl_pos = :upside_down } assert_nothing_raised('accepts valid label position') { @d_lbls.d_lbl_pos = :ctr } diff --git a/test/drawing/tc_drawing.rb b/test/drawing/tc_drawing.rb index 05ffee98..bc9fc686 100644 --- a/test/drawing/tc_drawing.rb +++ b/test/drawing/tc_drawing.rb @@ -30,12 +30,14 @@ class TestDrawing < Test::Unit::TestCase assert_equal(600, image.width) assert_equal(400, image.height) end + def test_add_two_cell_anchor_image src = File.dirname(__FILE__) + "/../fixtures/image1.jpeg" image = @ws.add_image(:image_src => src, :start_at=>[0,0], :end_at => [15,0]) assert(@ws.drawing.anchors.last.is_a?(Axlsx::TwoCellAnchor)) assert(image.is_a?(Axlsx::Pic)) end + def test_charts chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"bob", :start_at=>[0,0], :end_at=>[1,1]) assert_equal(@ws.drawing.charts.last, chart, "add chart is returned") diff --git a/test/drawing/tc_picture_locking.rb b/test/drawing/tc_picture_locking.rb index 794c8f6a..3714df0b 100644 --- a/test/drawing/tc_picture_locking.rb +++ b/test/drawing/tc_picture_locking.rb @@ -4,6 +4,7 @@ class TestPictureLocking < Test::Unit::TestCase def setup @item = Axlsx::PictureLocking.new end + def teardown end diff --git a/test/drawing/tc_scatter_chart.rb b/test/drawing/tc_scatter_chart.rb index 15b1f0a0..37748b2f 100644 --- a/test/drawing/tc_scatter_chart.rb +++ b/test/drawing/tc_scatter_chart.rb @@ -27,6 +27,7 @@ class TestScatterChart < Test::Unit::TestCase assert(@chart.scatterStyle == :marker) assert_raise(ArgumentError) { @chart.scatterStyle = :buckshot } end + def test_initialization assert_equal(@chart.scatterStyle, :lineMarker, "scatterStyle defualt incorrect") assert_equal(@chart.series_type, Axlsx::ScatterSeries, "series type incorrect") diff --git a/test/drawing/tc_val_axis.rb b/test/drawing/tc_val_axis.rb index aa1cb23a..7fd9d1dd 100644 --- a/test/drawing/tc_val_axis.rb +++ b/test/drawing/tc_val_axis.rb @@ -4,6 +4,7 @@ class TestValAxis < Test::Unit::TestCase def setup @axis = Axlsx::ValAxis.new end + def teardown end diff --git a/test/drawing/tc_vml_shape.rb b/test/drawing/tc_vml_shape.rb index 94ad6e9f..d8f10b56 100644 --- a/test/drawing/tc_vml_shape.rb +++ b/test/drawing/tc_vml_shape.rb @@ -84,12 +84,14 @@ class TestVmlShape < Test::Unit::TestCase assert(shape.top_row == 3) assert_raise(ArgumentError) { shape.top_row = [] } end + def test_visible shape = @comments.first.vml_shape shape.visible = false assert(shape.visible == false) assert_raise(ArgumentError) { shape.visible = 'foo' } end + def test_to_xml_string str = @comments.vml_drawing.to_xml_string() doc = Nokogiri::XML(str) |
