- test updates: t/load.t replaced by t/00load.t; added t/pod.t
[Business-OnlinePayment-PayflowPro.git] / t / bop.t
diff --git a/t/bop.t b/t/bop.t
index 64332c5..37bd4a1 100644 (file)
--- a/t/bop.t
+++ b/t/bop.t
@@ -1,5 +1,28 @@
-BEGIN { $| = 1; print "1..1\n"; }
-END {print "not ok 1\n" unless $loaded;}
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Test::More tests => 6;
+
 use Business::OnlinePayment;
-$loaded = 1;
-print "ok 1\n";
+
+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" );
+}