From: plobbes <plobbes>
Date: Mon, 22 Jan 2007 06:27:18 +0000 (+0000)
Subject: - basic module test cases not dependent on a Payflow Pro test account
X-Git-Tag: BUSINESS_ONLINEPAYMENT_PAYFLOWPRO_0_05~6
X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment-PayflowPro.git;a=commitdiff_plain;h=bfcba819f38062091e3127287dc97893ad924bcc

- basic module test cases not dependent on a Payflow Pro test account
---

diff --git a/t/bop.t b/t/bop.t
new file mode 100644
index 0000000..37bd4a1
--- /dev/null
+++ b/t/bop.t
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Test::More tests => 6;
+
+use Business::OnlinePayment;
+
+my $package = "Business::OnlinePayment";
+my $driver  = "PayflowPro";
+
+{    # new
+    my $obj;
+
+    $obj = $package->new($driver);
+    isa_ok( $obj, $package );
+
+    # new (via build_subs) automatically creates convenience methods
+    can_ok( $obj, qw(vendor partner cert_path) );
+    can_ok( $obj, qw(order_number avs_code cvv2_code) );
+
+    # defaults
+    my $server = "payflow.verisign.com";
+
+    is( $obj->server,    $server, "server($server)" );
+    is( $obj->port,      "443",   "port(443)" );
+    is( $obj->cert_path, undef,   "cert_path" );
+}