[Bps-public-commit] r11270 - WebChart/t
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Mar 30 10:36:38 EDT 2008
Author: sunnavy
Date: Sun Mar 30 10:36:37 2008
New Revision: 11270
Modified:
WebChart/t/webchart.t
Log:
we need more config dirs, added tests for that
Modified: WebChart/t/webchart.t
==============================================================================
--- WebChart/t/webchart.t (original)
+++ WebChart/t/webchart.t Sun Mar 30 10:36:37 2008
@@ -5,15 +5,20 @@
use WebChart;
use File::Spec;
-use Test::More tests => 26;
+use Test::More tests => 41;
my $wc = WebChart->new;
my %default = (
- img_dir => File::Spec->tmpdir,
- web_img_dir => '/charts',
- width => 400,
- height => 300,
- css_class => undef,
+ img_dir => File::Spec->tmpdir,
+ xml_dir => File::Spec->tmpdir,
+ web_xml_dir => '/xml',
+ web_img_dir => '/charts',
+ web_js_dir => '/js',
+ web_flash_dir => '/flash',
+ web_css_dir => '/css',
+ width => 400,
+ height => 300,
+ css_class => undef,
);
for ( keys %default ) {
@@ -22,11 +27,16 @@
}
my %args = (
- img_dir => '/tmp',
- web_img_dir => '/pictures',
- width => 800,
- height => 600,
- css_class => 'foo bar',
+ img_dir => '/tmp',
+ web_img_dir => '/pictures',
+ xml_dir => '/tmp',
+ web_xml_dir => '/xmlfiles',
+ web_js_dir => '/javascripts',
+ web_flash_dir => '/swf',
+ web_css_dir => '/style',
+ width => 800,
+ height => 600,
+ css_class => 'foo bar',
);
$wc = WebChart->new(%args);
@@ -71,13 +81,18 @@
);
%args = (
- data => $data,
- type => 'bars',
- width => 800,
- height => 600,
- css_class => 'foo bar',
- img_dir => '/howdy',
- web_img_dir => '/world'
+ data => $data,
+ type => 'bars',
+ width => 800,
+ height => 600,
+ css_class => 'foo bar',
+ img_dir => '/howdy',
+ web_img_dir => '/world',
+ xml_dir => 'sam',
+ web_xml_dir => 'frodo',
+ web_js_dir => 'ring',
+ web_flash_dir => 'gandolf',
+ web_css_dir => '/ring',
);
%return = $wc->render(%args);
is_deeply(
More information about the Bps-public-commit
mailing list