Bug 5327 - Now we are doing db calls, we need to shift this to t/db_dependent
authorChris Cormack <chrisc@catalyst.net.nz>
Wed, 19 Jan 2011 00:38:52 +0000 (13:38 +1300)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 19 Jan 2011 00:38:52 +0000 (13:38 +1300)
t/Amazon.t [deleted file]
t/db_dependent/Amazon.t [new file with mode: 0755]

diff --git a/t/Amazon.t b/t/Amazon.t
deleted file mode 100755 (executable)
index f8352c8..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/perl
-#
-# This Koha test module is a stub!  
-# Add more tests here!!!
-
-use strict;
-use warnings;
-
-use Test::More tests => 8;
-use C4::Context;
-
-BEGIN {
-        use_ok('C4::External::Amazon');
-}
-
-my $context = C4::Context->new();
-
-my $locale = $context->preference('AmazonLocale');
-
-$context->set_preference('AmazonLocale','CA');
-$context->clear_syspref_cache();
-is(get_amazon_tld,'.ca','Changes locale to CA and tests get_amazon_tld');
-
-$context->set_preference('AmazonLocale','DE');
-$context->clear_syspref_cache();
-is(get_amazon_tld,'.de','Changes locale to DE and tests get_amazon_tld');
-
-$context->set_preference('AmazonLocale','FR');
-$context->clear_syspref_cache();
-is(get_amazon_tld,'.fr','Changes locale to FR and tests get_amazon_tld');
-
-$context->set_preference('AmazonLocale','JP');
-$context->clear_syspref_cache();
-is(get_amazon_tld,'.jp','Changes locale to JP and tests get_amazon_tld');
-
-$context->set_preference('AmazonLocale','UK');
-$context->clear_syspref_cache();
-is(get_amazon_tld,'.co.uk','Changes locale to UK and tests get_amazon_tld');
-
-$context->set_preference('AmazonLocale','US');
-$context->clear_syspref_cache();
-is(get_amazon_tld,'.com','Changes locale to US and tests get_amazon_tld');
-
-$context->set_preference('AmazonLocale','NZ');
-$context->clear_syspref_cache();
-is(get_amazon_tld,'.com','Changes locale to one not in the array and tests get_amazon_tld');
-
-$context->set_preference('AmazonLocale',$locale);
-$context->clear_syspref_cache();
diff --git a/t/db_dependent/Amazon.t b/t/db_dependent/Amazon.t
new file mode 100755 (executable)
index 0000000..f8352c8
--- /dev/null
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+#
+# This Koha test module is a stub!  
+# Add more tests here!!!
+
+use strict;
+use warnings;
+
+use Test::More tests => 8;
+use C4::Context;
+
+BEGIN {
+        use_ok('C4::External::Amazon');
+}
+
+my $context = C4::Context->new();
+
+my $locale = $context->preference('AmazonLocale');
+
+$context->set_preference('AmazonLocale','CA');
+$context->clear_syspref_cache();
+is(get_amazon_tld,'.ca','Changes locale to CA and tests get_amazon_tld');
+
+$context->set_preference('AmazonLocale','DE');
+$context->clear_syspref_cache();
+is(get_amazon_tld,'.de','Changes locale to DE and tests get_amazon_tld');
+
+$context->set_preference('AmazonLocale','FR');
+$context->clear_syspref_cache();
+is(get_amazon_tld,'.fr','Changes locale to FR and tests get_amazon_tld');
+
+$context->set_preference('AmazonLocale','JP');
+$context->clear_syspref_cache();
+is(get_amazon_tld,'.jp','Changes locale to JP and tests get_amazon_tld');
+
+$context->set_preference('AmazonLocale','UK');
+$context->clear_syspref_cache();
+is(get_amazon_tld,'.co.uk','Changes locale to UK and tests get_amazon_tld');
+
+$context->set_preference('AmazonLocale','US');
+$context->clear_syspref_cache();
+is(get_amazon_tld,'.com','Changes locale to US and tests get_amazon_tld');
+
+$context->set_preference('AmazonLocale','NZ');
+$context->clear_syspref_cache();
+is(get_amazon_tld,'.com','Changes locale to one not in the array and tests get_amazon_tld');
+
+$context->set_preference('AmazonLocale',$locale);
+$context->clear_syspref_cache();