update tests to skip when optional modules aren't available
authorTony Cook <tony@develop-help.com>
Mon, 20 May 2013 05:20:20 +0000 (15:20 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 20 May 2013 05:24:18 +0000 (15:24 +1000)
t/080-remote/010-save.t
t/080-remote/020-cat.t
t/080-remote/030-parent.t
t/080-remote/040-steps.t
t/130-importer/010-csv.t
t/130-importer/020-article.t
t/130-importer/030-product.t

index efd75883d927bc95af44d6b1a5e25e59004d2c2e..76bc7c4e5e724fde4bbc93098261cabb1c236583 100644 (file)
@@ -21,7 +21,7 @@ my $baseurl = base_url;
 
 my $add_url = $baseurl . "/cgi-bin/admin/add.pl";
 
-my @ajax_hdr = qw(X-Requested-With: XMLHttpRequest);
+my @ajax_hdr = qw(X-Requested-With XMLHttpRequest);
 
 my %add_req =
   (
index 115ae9f08756be6b0eac6fb1b33f07a1f52c82b4..76acac4f72c98244f8e8c49e39c31947ce3bea3e 100644 (file)
@@ -11,7 +11,7 @@ my $baseurl = base_url;
 
 my $add_url = $baseurl . "/cgi-bin/admin/add.pl";
 
-my @ajax_hdr = qw(X-Requested-With: XMLHttpRequest);
+my @ajax_hdr = qw(X-Requested-With XMLHttpRequest);
 
 # make a catalog
 my $cat = do_add($add_url, 
index d6896674eef2998d378062d6c32f5e26fda4d08b..34b2925278460173168623456dc2d228e3325369 100644 (file)
@@ -10,7 +10,7 @@ my $baseurl = base_url;
 
 my $add_url = $baseurl . "/cgi-bin/admin/add.pl";
 
-my @ajax_hdr = qw(X-Requested-With: XMLHttpRequest);
+my @ajax_hdr = qw(X-Requested-With XMLHttpRequest);
 
 # make a parent
 my $par = do_add($add_url, 
index 00934b8c12ecc2f810f1f6173adb15dd297b1edc..380c6606c1751b25be51915fe877d8381d89f7a3 100644 (file)
@@ -11,7 +11,7 @@ my $baseurl = base_url;
 
 my $add_url = $baseurl . "/cgi-bin/admin/add.pl";
 
-my @ajax_hdr = qw(X-Requested-With: XMLHttpRequest);
+my @ajax_hdr = qw(X-Requested-With XMLHttpRequest);
 
 my $parent = do_add({ parentid => -1, title => "parent2" }, "make parent");
 sleep 1;
index b5d0ea420dc9c12df7e5f521dcc07848e1bb2644..ed6715c09f0f214254c10925b7a58691605571b0 100644 (file)
@@ -1,6 +1,6 @@
 #!perl -w
 use strict;
-use Test::More tests => 8;
+use Test::More;
 use BSE::Cfg;
 BEGIN {
   eval "require Text::CSV;"
@@ -8,6 +8,8 @@ BEGIN {
 }
 use BSE::Importer::Source::CSV;
 
+plan tests => 8;
+
 {
   my $cfg = BSE::Cfg->new_from_text(text => <<CFG);
 [import profile test]
index 5840c35b56c8ba49e6e2a6f6cdd654f457adfff5..7b39f46d2503095282cfba61b51cee2ee8114d12 100644 (file)
@@ -3,8 +3,13 @@ use strict;
 use BSE::Test qw(base_url);
 use File::Spec;
 use File::Temp;
+use Test::More;
 
-use Test::More tests => 42;
+BEGIN {
+  eval "require Text::CSV;"
+    or plan skip_all => "Text::CSV not available";
+}
+plan tests => 42;
 
 BEGIN {
   unshift @INC, File::Spec->catdir(BSE::Test::base_dir(), "cgi-bin", "modules");
index e477b5e55bd74e4c019ad8b4470a24f65ad6a0fa..e55e874f2eac38368467e818cf3071b51d847d75 100644 (file)
@@ -3,8 +3,14 @@ use strict;
 use BSE::Test qw(base_url);
 use File::Spec;
 use File::Temp;
+use Test::More;
 
-use Test::More tests => 8;
+BEGIN {
+  eval "require Text::CSV;"
+    or plan skip_all => "Text::CSV not available";
+}
+
+plan tests => 8;
 
 BEGIN {
   unshift @INC, File::Spec->catdir(BSE::Test::base_dir(), "cgi-bin", "modules");