Fixed typo, HIDE_GRIDLINES instead of HIDE_GRIDLINE
[p5sagit/Excel-Template.git] / t / 006_variables.t
CommitLineData
b6bc5a5d 1use strict;
b6bc5a5d 2
3use Test::More tests => 5;
4
5use lib 't';
6use mock;
c11fa570 7mock::reset;
b6bc5a5d 8
9my $CLASS = 'Excel::Template';
10use_ok( $CLASS );
11
12my $object = $CLASS->new(
13 filename => 't/006.xml',
14);
15isa_ok( $object, $CLASS );
16
17ok(
18 $object->param(
19 test1 => 'test1',
20 test2 => 'test2',
21 ),
22 'Parameters set',
23);
24
25ok( $object->write_file( 'filename' ), 'Something returned' );
26
c11fa570 27my @calls = mock::get_calls;
b6bc5a5d 28is( join( $/, @calls, '' ), <<__END_EXPECTED__, 'Calls match up' );
29Spreadsheet::WriteExcel::new( 'filename' )
30Spreadsheet::WriteExcel::add_format( '' )
31Spreadsheet::WriteExcel::add_worksheet( 'cell' )
32Spreadsheet::WriteExcel::Worksheet::new( '' )
33Spreadsheet::WriteExcel::Worksheet::write( '0', '0', 'test1', '1' )
34Spreadsheet::WriteExcel::Worksheet::write( '0', '1', 'test2', '1' )
35Spreadsheet::WriteExcel::Worksheet::write( '0', '2', 'PRE test1 POST', '1' )
36Spreadsheet::WriteExcel::close( '' )
37__END_EXPECTED__