Bugzilla – Attachment 20586 Details for
Bug 10630
DelBookseller's return value needs to be more explicit in C4::Bookseller.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10630: DelBookseller's always returns undef in C4::Bookseller.pm
PASSED-QA-Bug-10630-DelBooksellers-always-returns-.patch (text/plain), 2.11 KB, created by
Katrin Fischer
on 2013-08-25 11:59:02 UTC
(
hide
)
Description:
[PASSED QA] Bug 10630: DelBookseller's always returns undef in C4::Bookseller.pm
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-08-25 11:59:02 UTC
Size:
2.11 KB
patch
obsolete
>From 0a19602f05737b9ca8d9c941ca70936849ef000e Mon Sep 17 00:00:00 2001 >From: root <root@kenza-VirtualBox> >Date: Thu, 25 Jul 2013 09:37:34 +0200 >Subject: [PATCH] [PASSED QA] Bug 10630: DelBookseller's always returns undef > in C4::Bookseller.pm > >This patch makes DelBookseller returns the number of supplier it has deleted >or undef if nothing has been deleted. >It also fixes a test which doesn't pass before in t/db_dependent/Bookseller.t > >To test: >prove t/db_dependent/Bookseller.t >t/db_dependent/Bookseller.t .. 1/54 >All tests successful. >Files=1, Tests=54, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.48 cusr 0.02 csys = 0.52 CPU) >Result: PASS > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Logical change and makes another test pass :) >--- > C4/Bookseller.pm | 3 +-- > t/db_dependent/Bookseller.t | 5 ++--- > 2 files changed, 3 insertions(+), 5 deletions(-) > >diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm >index 3e1454f..c53919f 100644 >--- a/C4/Bookseller.pm >+++ b/C4/Bookseller.pm >@@ -269,8 +269,7 @@ sub DelBookseller { > my $id = shift; > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare('DELETE FROM aqbooksellers WHERE id=?'); >- $sth->execute($id); >- return; >+ return $sth->execute($id); > } > > 1; >diff --git a/t/db_dependent/Bookseller.t b/t/db_dependent/Bookseller.t >index 71307f1..fdac9c2 100644 >--- a/t/db_dependent/Bookseller.t >+++ b/t/db_dependent/Bookseller.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > >-use Test::More tests => 53; >+use Test::More tests => 54; > use C4::Context; > use Koha::DateUtils; > use DateTime::Duration; >@@ -104,8 +104,7 @@ is( scalar( C4::Bookseller::GetBookSeller('') ), > > #Test DelBookseller > my $del = C4::Bookseller::DelBookseller($id_supplier1); >-#FIXME: DelBookSeller always returns undef (if it works or not) >-#is( $del, 1, "DelBookseller returns 1 - 1 supplier has been deleted " ); >+is( $del, 1, "DelBookseller returns 1 - 1 supplier has been deleted " ); > is( C4::Bookseller::GetBookSellerFromId($id_supplier1), > undef, "Supplier1 has been deleted - id_supplier1 doesnt exist anymore" ); > >-- >1.7.9.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 10630
:
19927
|
19937
|
20203
| 20586