Fixed RT #65764 - enable cell-comments
[p5sagit/Excel-Template.git] / t / 030_cell_comment.t
CommitLineData
997b1ce3 1use strict;
2
3use Test::More tests => 4;
4
5use lib 't';
6use mock;
7mock::reset;
8
9my $CLASS = 'Excel::Template';
10use_ok( $CLASS );
11
12my $object = $CLASS->new(
13 filename => 't/030.xml',
14);
15isa_ok( $object, $CLASS );
16
17ok( $object->write_file( 'filename' ), 'Something returned' );
18
19my @calls = mock::get_calls;
20
21is_deeply([@calls],[
22 q[Spreadsheet::WriteExcel::new( 'filename' )],
23 q[Spreadsheet::WriteExcel::add_format( '' )],
24 q[Spreadsheet::WriteExcel::add_worksheet( 'cell' )],
25 q[Spreadsheet::WriteExcel::Worksheet::new( '' )],
26 q[Spreadsheet::WriteExcel::Worksheet::write( '0', '0', 'Test1', '1' )],
27 q[Spreadsheet::WriteExcel::Worksheet::write_comment( '0', '0', 'Test1' )],
28 q[Spreadsheet::WriteExcel::Worksheet::write( '0', '1', 'Test2', '1' )],
29 q[Spreadsheet::WriteExcel::Worksheet::write_comment( '0', '1', 'Test2' )],
30 q[Spreadsheet::WriteExcel::Worksheet::write( '0', '2', 'Test3', '1' )],
31 q[Spreadsheet::WriteExcel::close( '' )],
32],'Calls match up');