Bugzilla – Attachment 62275 Details for
Bug 18420
Some tests fail without patron category 'S'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18420: Fix Passwordrecovery.t when no patron category 'S' exists
Bug-18420-Fix-Passwordrecoveryt-when-no-patron-cat.patch (text/plain), 2.58 KB, created by
Marcel de Rooy
on 2017-04-18 12:26:08 UTC
(
hide
)
Description:
Bug 18420: Fix Passwordrecovery.t when no patron category 'S' exists
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-04-18 12:26:08 UTC
Size:
2.58 KB
patch
obsolete
>From a766b4a80bcf7a016590b00cdbdef188962d28ad Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 12 Apr 2017 11:06:43 -0300 >Subject: [PATCH] Bug 18420: Fix Passwordrecovery.t when no patron category 'S' > exists >MIME-Version: 1.0 >Content-Type: text/plain; charset=utf-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset=utf-8 > >No need to create Staff users here. > >Test plan: > prove t/db_dependent/Passwordrecovery.t >should return green, even if no categories.categorycode 'S' exists > >Signed-off-by: Marc Véron <veron@veron.ch> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Passwordrecovery.t | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Passwordrecovery.t b/t/db_dependent/Passwordrecovery.t >index f8ae6aa..4d4781b 100755 >--- a/t/db_dependent/Passwordrecovery.t >+++ b/t/db_dependent/Passwordrecovery.t >@@ -21,6 +21,7 @@ use C4::Context; > use C4::Letters; > use Koha::Database; > use Koha::Patrons; >+use t::lib::TestBuilder; > > use Test::More tests => 18; > >@@ -35,7 +36,7 @@ $dbh->{RaiseError} = 1; > # > # Start with fresh data > # >- >+my $builder = t::lib::TestBuilder->new; > my $borrowernumber1 = '2000000000'; > my $borrowernumber2 = '2000000001'; > my $borrowernumber3 = '2000000002'; >@@ -49,7 +50,7 @@ my $uuid1 = "ABCD1234"; > my $uuid2 = "WXYZ0987"; > my $uuid3 = "LMNO4561"; > >-my $categorycode = 'S'; # staff >+my $patron_category = $builder->build({ source => 'Category' }); > my $branch = $schema->resultset('Branch')->first(); # legit branch from your db > > $schema->resultset('BorrowerPasswordRecovery')->delete_all(); >@@ -62,7 +63,7 @@ $schema->resultset('Borrower')->create( > city => '', > userid => $userid1, > email => $email1, >- categorycode => $categorycode, >+ categorycode => $patron_category->{categorycode}, > branchcode => $branch, > } > ); >@@ -74,7 +75,7 @@ $schema->resultset('Borrower')->create( > city => '', > userid => $userid2, > email => $email2, >- categorycode => $categorycode, >+ categorycode => $patron_category->{categorycode}, > branchcode => $branch, > } > ); >@@ -86,7 +87,7 @@ $schema->resultset('Borrower')->create( > city => '', > userid => $userid3, > email => $email3, >- categorycode => $categorycode, >+ categorycode => $patron_category->{categorycode}, > branchcode => $branch, > } > ); >-- >2.1.4
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 18420
:
62090
|
62091
|
62092
|
62093
|
62095
|
62115
|
62118
|
62164
|
62174
|
62175
|
62176
|
62177
|
62178
|
62179
|
62180
|
62274
| 62275 |
62276
|
62277
|
62278
|
62279
|
62280
|
112053