Bugzilla – Attachment 20768 Details for
Bug 10565
Add a "Patron List" feature for storing and manipulating collections of patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10565 - Add a "Patron List" feature for storing and manipulating collections of patrons - Followup 4 - Don't assume borrowernumber 1 exists in unit test
Bug-10565---Add-a-Patron-List-feature-for-storing-.patch (text/plain), 2.34 KB, created by
Kyle M Hall
on 2013-09-03 18:20:30 UTC
(
hide
)
Description:
Bug 10565 - Add a "Patron List" feature for storing and manipulating collections of patrons - Followup 4 - Don't assume borrowernumber 1 exists in unit test
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2013-09-03 18:20:30 UTC
Size:
2.34 KB
patch
obsolete
>From fc9ae4c0f4cb096965a8e14a4aede95fccb22d33 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 3 Sep 2013 14:19:41 -0400 >Subject: [PATCH] Bug 10565 - Add a "Patron List" feature for storing and manipulating collections of patrons - Followup 4 - Don't assume borrowernumber 1 exists in unit test > >--- > t/db_dependent/PatronLists.t | 18 ++++++++++-------- > 1 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/PatronLists.t b/t/db_dependent/PatronLists.t >index 146b4f0..54a153a 100755 >--- a/t/db_dependent/PatronLists.t >+++ b/t/db_dependent/PatronLists.t >@@ -14,19 +14,21 @@ my $sth = $dbh->prepare("SELECT * FROM borrowers ORDER BY RAND() LIMIT 10"); > $sth->execute(); > my @borrowers = @{ $sth->fetchall_arrayref( {} ) }; > >-my @lists = GetPatronLists( { owner => 1 } ); >+my $owner = $borrowers[0]->{borrowernumber}; >+ >+my @lists = GetPatronLists( { owner => $owner } ); > my $list_count_original = @lists; > >-my $list1 = AddPatronList( { name => 'Test List 1', owner => 1 } ); >+my $list1 = AddPatronList( { name => 'Test List 1', owner => $owner } ); > ok( $list1->name() eq 'Test List 1', 'AddPatronList works' ); > >-my $list2 = AddPatronList( { name => 'Test List 2', owner => 1 } ); >+my $list2 = AddPatronList( { name => 'Test List 2', owner => $owner } ); > > ModPatronList( > { > patron_list_id => $list2->patron_list_id(), > name => 'Test List 3', >- owner => 1 >+ owner => $owner > } > ); > $list2->discard_changes(); >@@ -64,12 +66,12 @@ DelPatronsFromList( > $list1->discard_changes(); > ok( !$list1->patron_list_patrons()->count(), 'DelPatronsFromList works.' ); > >-@lists = GetPatronLists( { owner => 1 } ); >+@lists = GetPatronLists( { owner => $owner } ); > ok( @lists == $list_count_original + 2, 'GetPatronLists works' ); > >-DelPatronList( { patron_list_id => $list1->patron_list_id(), owner => 1 } ); >-DelPatronList( { patron_list_id => $list2->patron_list_id(), owner => 1 } ); >+DelPatronList( { patron_list_id => $list1->patron_list_id(), owner => $owner } ); >+DelPatronList( { patron_list_id => $list2->patron_list_id(), owner => $owner } ); > > @lists = >- GetPatronLists( { patron_list_id => $list1->patron_list_id(), owner => 1 } ); >+ GetPatronLists( { patron_list_id => $list1->patron_list_id(), owner => $owner } ); > ok( !@lists, 'DelPatronList works' ); >-- >1.7.2.5
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 10565
:
19726
|
19727
|
19728
|
19732
|
19733
|
19734
|
19757
|
19759
|
19761
|
19762
|
19770
|
20511
|
20721
|
20768
|
21084
|
21086
|
21087
|
21088
|
21089