Bugzilla – Attachment 91171 Details for
Bug 23199
Koha::Patron->store and uppercasesurname syspref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23199: Added tests for Koha::Patron
Bug-23199-Added-tests-for-KohaPatron.patch (text/plain), 1.49 KB, created by
Mark Tompsett
on 2019-07-02 05:07:17 UTC
(
hide
)
Description:
Bug 23199: Added tests for Koha::Patron
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2019-07-02 05:07:17 UTC
Size:
1.49 KB
patch
obsolete
>From e80eb34df52070b9c536ff5cb53f9635cb8a8859 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 2 Jul 2019 05:01:55 +0000 >Subject: [PATCH] Bug 23199: Added tests for Koha::Patron > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > t/db_dependent/Koha/Patrons.t | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index a73b8e819d..b0e2bd8763 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -1526,7 +1526,7 @@ subtest 'Test Koha::Patrons::merge' => sub { > }; > > subtest '->store' => sub { >- plan tests => 3; >+ plan tests => 5; > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; > >@@ -1550,6 +1550,17 @@ subtest '->store' => sub { > $patron_1->surname('xxx')->store; > is( $patron_1->password, $digest, 'Password should not have changed on ->store'); > >+ # Test uppercasesurname >+ t::lib::Mocks::mock_preference( 'uppercasesurname', 1 ); >+ my $surname = lc $patron_1->surname; >+ $patron_1->surname($surname)->store; >+ isnt( $patron_1->surname, $surname, >+ 'Surname converts to uppercase on store.'); >+ t::lib::Mocks::mock_preference( 'uppercasesurname', 0 ); >+ $patron_1->surname($surname)->store; >+ is( $patron_1->surname, $surname, >+ 'Surname remains unchanged on store.'); >+ > $schema->storage->dbh->{PrintError} = $print_error; > $schema->storage->txn_rollback; > }; >-- >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 23199
:
90982
|
90983
|
90996
|
91170
|
91171
|
91172
|
91318
|
91319
|
91320