[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2419] trunk/t
- Subject: SF.net SVN: ledger-smb:[2419] trunk/t
- From: ..hidden..
- Date: Sun, 23 Nov 2008 00:15:15 +0000
Revision: 2419
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2419&view=rev
Author: einhverfr
Date: 2008-11-23 00:15:15 +0000 (Sun, 23 Nov 2008)
Log Message:
-----------
Test case corrected to set config entry first.
Modified Paths:
--------------
trunk/t/62-api.t
trunk/t/data/62-request-data
Modified: trunk/t/62-api.t
===================================================================
--- trunk/t/62-api.t 2008-11-23 00:07:20 UTC (rev 2418)
+++ trunk/t/62-api.t 2008-11-23 00:15:15 UTC (rev 2419)
@@ -35,6 +35,9 @@
my $locale = LedgerSMB::Locale->get_handle( ${LedgerSMB::Sysconfig::language} );
for my $test (@$test_request_data){
+ if (ref $pre_test_subs->{"$test->{_test_id}"} eq 'CODE'){
+ $pre_test_subs->{"$test->{_test_id}"}();
+ }
if (lc $test->{_codebase} eq 'old'){
next; # skip old codebase tests for now
old_code_test::_load_script($test->{module});
Modified: trunk/t/data/62-request-data
===================================================================
--- trunk/t/data/62-request-data 2008-11-23 00:07:20 UTC (rev 2418)
+++ trunk/t/data/62-request-data 2008-11-23 00:15:15 UTC (rev 2419)
@@ -95,7 +95,11 @@
},
];
-our $pre_test_subs = {};
+our $pre_test_subs = {
+ 'Payment print total' => sub {
+ $LedgerSMB::Sysconfig::check_max_invoices = 1;
+ },
+};
our $api_test_cases = {
'AR Transaction Voucher Screen' => sub {
my $request = shift;
@@ -121,6 +125,7 @@
use strict;
my $request = shift;
$request->debug({file => '/tmp/check' });
+ cmp_ok($request->{invoice_count_25}, '>', $LedgerSMB::Sysconfig::check_max_invoices, 'Test is valid under current config');
cmp_ok(scalar @{$request->{checks}}, '==',
$request->{contact_count},
'Correct number of checks printed');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.