Revision 1c98ac62
Von Moritz Bunkus vor mehr als 4 Jahren hinzugefügt
t/bank/bank_transactions.t | ||
---|---|---|
1022 | 1022 |
is($bt->invoice_amount , '0.00000' , "$testname: bt invoice amount was not assigned"); |
1023 | 1023 |
|
1024 | 1024 |
my $bt_controller = SL::Controller::BankTransaction->new; |
1025 |
$::form->{dont_render_for_test} = 1; |
|
1026 |
$::form->{filter}{bank_account} = $bank_account->id; |
|
1027 |
my ( $bt_transactions, $proposals ) = $bt_controller->action_list; |
|
1025 |
my ( $bt_transactions, $proposals ) = $bt_controller->gather_bank_transactions_and_proposals(bank_account => $bank_account); |
|
1028 | 1026 |
|
1029 | 1027 |
is(scalar(@$bt_transactions) , 1 , "$testname: one bank_transaction"); |
1030 | 1028 |
is($bt_transactions->[0]->{agreement}, 20 , "$testname: agreement == 20"); |
... | ... | |
1075 | 1073 |
is($sei->amount , '119.00000' , "$testname: sepa export amount ok"); |
1076 | 1074 |
|
1077 | 1075 |
my $bt_controller = SL::Controller::BankTransaction->new; |
1078 |
$::form->{dont_render_for_test} = 1; |
|
1079 |
$::form->{filter}{bank_account} = $bank_account->id; |
|
1080 |
my ( $bt_transactions, $proposals ) = $bt_controller->action_list; |
|
1076 |
my ( $bt_transactions, $proposals ) = $bt_controller->gather_bank_transactions_and_proposals(bank_account => $bank_account); |
|
1081 | 1077 |
|
1082 | 1078 |
is(scalar(@$bt_transactions) , 1 , "$testname: one bank_transaction"); |
1083 | 1079 |
is($bt_transactions->[0]->{agreement}, 25 , "$testname: agreement == 25"); |
... | ... | |
1143 | 1139 |
#nun sollten zwei gleichwertige Rechnungen $ar_transaction_1 und $ar_transaction_3 für $bt1 gefunden werden |
1144 | 1140 |
#aber es darf keine Proposals geben mit mehreren Rechnungen |
1145 | 1141 |
my $bt_controller = SL::Controller::BankTransaction->new; |
1146 |
$::form->{dont_render_for_test} = 1; |
|
1147 |
$::form->{filter}{bank_account} = $bank_account->id; |
|
1148 |
my ( $bt_transactions, $proposals ) = $bt_controller->action_list; |
|
1142 |
my ( $bt_transactions, $proposals ) = $bt_controller->gather_bank_transactions_and_proposals(bank_account => $bank_account); |
|
1149 | 1143 |
|
1150 | 1144 |
is(scalar(@$bt_transactions) , 2 , "$testname: two bank_transaction"); |
1151 | 1145 |
is(scalar(@$proposals) , 0 , "$testname: no proposals"); |
... | ... | |
1155 | 1149 |
# Jetzt gibt es zwei Kontobewegungen mit gleichen Punkten für eine Rechnung. |
1156 | 1150 |
# hier darf es auch keine Proposals geben |
1157 | 1151 |
|
1158 |
( $bt_transactions, $proposals ) = $bt_controller->action_list;
|
|
1152 |
( $bt_transactions, $proposals ) = $bt_controller->gather_bank_transactions_and_proposals(bank_account => $bank_account);
|
|
1159 | 1153 |
|
1160 | 1154 |
is(scalar(@$bt_transactions) , 2 , "$testname: two bank_transaction"); |
1161 | 1155 |
# odyn testfall - anforderungen so (noch) nicht in kivi |
... | ... | |
1166 | 1160 |
# hier darf es auch keine Proposals geben |
1167 | 1161 |
$bt3->update_attributes( purpose => "fuer Rechnung salesinv10000"); |
1168 | 1162 |
|
1169 |
( $bt_transactions, $proposals ) = $bt_controller->action_list;
|
|
1163 |
( $bt_transactions, $proposals ) = $bt_controller->gather_bank_transactions_and_proposals(bank_account => $bank_account);
|
|
1170 | 1164 |
|
1171 | 1165 |
is(scalar(@$bt_transactions) , 2 , "$testname: two bank_transaction"); |
1172 | 1166 |
# odyn testfall - anforderungen so (noch) nicht in kivi |
Auch abrufbar als: Unified diff
BankTransaction: Vorschlagslistencode aus action_list eigene Funktion verlagert