X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F030_cell_comment.t;fp=t%2F030_cell_comment.t;h=a1d8e44cbf654cf3f51d377c08be0b5fdfe9a260;hb=997b1ce3a3b98096a37d1733af806017ffa98293;hp=0000000000000000000000000000000000000000;hpb=2feb13f6ff44c67bf8a2acfa1eea15ad20e3bb86;p=p5sagit%2FExcel-Template.git diff --git a/t/030_cell_comment.t b/t/030_cell_comment.t new file mode 100644 index 0000000..a1d8e44 --- /dev/null +++ b/t/030_cell_comment.t @@ -0,0 +1,32 @@ +use strict; + +use Test::More tests => 4; + +use lib 't'; +use mock; +mock::reset; + +my $CLASS = 'Excel::Template'; +use_ok( $CLASS ); + +my $object = $CLASS->new( + filename => 't/030.xml', +); +isa_ok( $object, $CLASS ); + +ok( $object->write_file( 'filename' ), 'Something returned' ); + +my @calls = mock::get_calls; + +is_deeply([@calls],[ + q[Spreadsheet::WriteExcel::new( 'filename' )], + q[Spreadsheet::WriteExcel::add_format( '' )], + q[Spreadsheet::WriteExcel::add_worksheet( 'cell' )], + q[Spreadsheet::WriteExcel::Worksheet::new( '' )], + q[Spreadsheet::WriteExcel::Worksheet::write( '0', '0', 'Test1', '1' )], + q[Spreadsheet::WriteExcel::Worksheet::write_comment( '0', '0', 'Test1' )], + q[Spreadsheet::WriteExcel::Worksheet::write( '0', '1', 'Test2', '1' )], + q[Spreadsheet::WriteExcel::Worksheet::write_comment( '0', '1', 'Test2' )], + q[Spreadsheet::WriteExcel::Worksheet::write( '0', '2', 'Test3', '1' )], + q[Spreadsheet::WriteExcel::close( '' )], +],'Calls match up');