diff options
author | ivan <ivan> | 2006-10-18 23:11:55 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-10-18 23:11:55 +0000 |
commit | 39541291959ba143c5a9e8272b45d49aea654f35 (patch) | |
tree | bf457467de08ab63b2188ade1f851d31e947686c /t/lib | |
parent | 613a646d7362d686c7b1f241b1bb47db50968de7 (diff) |
update test to use Test::More and add hardcoded test account from auth.net, RT#22076
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/test_account.pl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/lib/test_account.pl b/t/lib/test_account.pl new file mode 100644 index 0000000..b86082b --- /dev/null +++ b/t/lib/test_account.pl @@ -0,0 +1,28 @@ +sub test_account_or_skip { + my($login, $password) = test_account(); + + unless( defined $login ) { + plan skip_all => "No test account"; + } + + return($login, $password); +} + +sub test_account { + open TEST_ACCOUNT, "t/test_account" or return; + my($login, $password) = <TEST_ACCOUNT>; + chomp $login; + chomp $password; + + return($login, $password); +} + +sub expiration_date { + my($month, $year) = (localtime)[4,5]; + $year++; # So we expire next year. + $year %= 100; # y2k? What's that? + + return sprintf("%02d/%02d", $month, $year); +} + +1; |