Bugzilla – Attachment 91319 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.58 KB, created by
Marcel de Rooy
on 2019-07-05 06:56:29 UTC
(
hide
)
Description:
Bug 23199: Added tests for Koha::Patron
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-07-05 06:56:29 UTC
Size:
1.58 KB
patch
obsolete
>From 2536c8c4a97c6744bcf03e674be9d6948466b465 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 >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 bba4dfe2e7..9d5de6bfe3 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -1584,7 +1584,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; > >@@ -1608,6 +1608,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