From 33d2914c28554ffe54ea618d8feb4ead1088c331 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 23 Jul 2009 20:57:51 +0000 Subject: [PATCH] More test maintenance for Payment drivers. --- t/Shop/Pay.t | 9 +++-- t/Shop/PayDriver/PayPal.t | 85 --------------------------------------- 2 files changed, 5 insertions(+), 89 deletions(-) delete mode 100644 t/Shop/PayDriver/PayPal.t diff --git a/t/Shop/Pay.t b/t/Shop/Pay.t index e5b8220ed..1d1e87055 100644 --- a/t/Shop/Pay.t +++ b/t/Shop/Pay.t @@ -143,10 +143,11 @@ is($newDriver->get('label'), 'Cold, stone hard cash', 'label passed correctly to my $drivers = $pay->getDrivers(); my $defaultPayDrivers = { - 'WebGUI::Shop::PayDriver::Cash' => 'Cash', - 'WebGUI::Shop::PayDriver::ITransact' => 'Credit Card (ITransact)', - 'WebGUI::Shop::PayDriver::PayPal' => 'PayPal', - 'WebGUI::Shop::PayDriver::Ogone' => 'Ogone', + 'WebGUI::Shop::PayDriver::Cash' => 'Cash', + 'WebGUI::Shop::PayDriver::ITransact' => 'Credit Card (ITransact)', + 'WebGUI::Shop::PayDriver::Ogone' => 'Ogone', + 'WebGUI::Shop::PayDriver::PayPal::PayPalStd' => 'PayPal', + 'WebGUI::Shop::PayDriver::PayPal::ExpressCheckout' => 'PayPal Express Checkout', }; cmp_deeply( $drivers, $defaultPayDrivers, 'getDrivers returns the default PayDrivers'); diff --git a/t/Shop/PayDriver/PayPal.t b/t/Shop/PayDriver/PayPal.t deleted file mode 100644 index 3123c78d4..000000000 --- a/t/Shop/PayDriver/PayPal.t +++ /dev/null @@ -1,85 +0,0 @@ -# vim:syntax=perl -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------ -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------ - -# Write a little about what this script tests. -# -# - -use FindBin; -use strict; -use lib "$FindBin::Bin/../../lib"; -use Test::More; -use Test::Deep; -use JSON; -use HTML::Form; - -use WebGUI::Test; # Must use this before any other WebGUI modules -use WebGUI::Session; - -#---------------------------------------------------------------------------- -# Init -my $session = WebGUI::Test->session; - -#---------------------------------------------------------------------------- -# Tests - -my $tests = 3; -plan tests => 1 + $tests; - -#---------------------------------------------------------------------------- -# figure out if the test can actually run - -my $e; - -my $loaded = use_ok('WebGUI::Shop::PayDriver::PayPal'); - -my $storage; - -SKIP: { - -skip 'Unable to load module WebGUI::Shop::PayDriver::PayPal', $tests unless $loaded; - -####################################################################### -# -# getName -# -####################################################################### -my $driver; -my $options = { - label => 'PayPal', - enabled => 1, - group => 3, - receiptMessage => 'Pannenkoeken zijn nog lekkerder met spek', -}; - -$driver = WebGUI::Shop::PayDriver::PayPal->create( $session, $options ); - -isa_ok ($driver, 'WebGUI::Shop::PayDriver'); -isa_ok ($driver, 'WebGUI::Shop::PayDriver::PayPal'); - -is($driver->getName($session), 'PayPal', 'getName returns the human readable name of this driver'); - -####################################################################### -# -# delete -# -####################################################################### - -$driver->delete; - -undef $driver; - -} - -#---------------------------------------------------------------------------- -# Cleanup -END { -}