Bugzilla – Attachment 84154 Details for
Bug 21692
Koha::Account->new has no tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21692: created a test for Koha::Account->new
Bug-21692-created-a-test-for-KohaAccount-new.patch (text/plain), 1.82 KB, created by
David Nind
on 2019-01-17 20:01:36 UTC
(
hide
)
Description:
Bug 21692: created a test for Koha::Account->new
Filename:
MIME Type:
Creator:
David Nind
Created:
2019-01-17 20:01:36 UTC
Size:
1.82 KB
patch
obsolete
>From 103b552e10847209fe8be7453445c60affd3a878 Mon Sep 17 00:00:00 2001 >From: Jasmine Amohia <jasmineamohia.student@wegc.school.nz> >Date: Thu, 17 Jan 2019 03:33:49 +0000 >Subject: [PATCH] Bug 21692: created a test for Koha::Account->new > >Test plan: >1) Run test for /Koha/Account.t and confirm that all tests were >successful > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/Koha/Account.t | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/Account.t b/t/db_dependent/Koha/Account.t >index 9fbef7c124..ee90f85f5c 100755 >--- a/t/db_dependent/Koha/Account.t >+++ b/t/db_dependent/Koha/Account.t >@@ -26,6 +26,7 @@ use Koha::Account; > use Koha::Account::Lines; > use Koha::Account::Offsets; > >+ > use t::lib::Mocks; > use t::lib::TestBuilder; > >@@ -61,7 +62,6 @@ subtest 'outstanding_debits() tests' => sub { > is( ref($lines_arr[$i]), 'Koha::Account::Line', 'outstanding_debits returns a list of Koha::Account::Line objects in list context' ); > $i++; > } >- > my $patron_2 = $builder->build_object({ class => 'Koha::Patrons' }); > Koha::Account::Line->new({ borrowernumber => $patron_2->id, amountoutstanding => -2 })->store; > my $just_one = Koha::Account::Line->new({ borrowernumber => $patron_2->id, amount => 3, amountoutstanding => 3 })->store; >@@ -140,7 +140,7 @@ subtest 'outstanding_credits() tests' => sub { > > subtest 'add_credit() tests' => sub { > >- plan tests => 15; >+ plan tests => 16; > > $schema->storage->txn_begin; > >@@ -150,6 +150,7 @@ subtest 'add_credit() tests' => sub { > > my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); > my $account = Koha::Account->new( { patron_id => $patron->borrowernumber } ); >+ is( defined $account, 1, "Account is defined" ); > > is( $account->balance, 0, 'Patron has no balance' ); > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21692
:
84121
|
84154
|
85221
|
85311
|
85312
|
85313