- basic module test cases not dependent on a Payflow Pro test account
authorplobbes <plobbes>
Mon, 22 Jan 2007 06:27:18 +0000 (06:27 +0000)
committerplobbes <plobbes>
Mon, 22 Jan 2007 06:27:18 +0000 (06:27 +0000)
t/bop.t [new file with mode: 0644]

diff --git a/t/bop.t b/t/bop.t
new file mode 100644 (file)
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" );
+}