View | Details | Raw Unified | Return to bug 10630
Collapse All | Expand All

(-)a/C4/Bookseller.pm (-2 / +1 lines)
Lines 269-276 sub DelBookseller { Link Here
269
    my $id  = shift;
269
    my $id  = shift;
270
    my $dbh = C4::Context->dbh;
270
    my $dbh = C4::Context->dbh;
271
    my $sth = $dbh->prepare('DELETE FROM aqbooksellers WHERE id=?');
271
    my $sth = $dbh->prepare('DELETE FROM aqbooksellers WHERE id=?');
272
    $sth->execute($id);
272
    return $sth->execute($id);
273
    return;
274
}
273
}
275
274
276
1;
275
1;
(-)a/t/db_dependent/Bookseller.t (-4 / +2 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More tests => 53;
5
use Test::More tests => 54;
6
use C4::Context;
6
use C4::Context;
7
use Koha::DateUtils;
7
use Koha::DateUtils;
8
use DateTime::Duration;
8
use DateTime::Duration;
Lines 104-111 is( scalar( C4::Bookseller::GetBookSeller('') ), Link Here
104
104
105
#Test DelBookseller
105
#Test DelBookseller
106
my $del = C4::Bookseller::DelBookseller($id_supplier1);
106
my $del = C4::Bookseller::DelBookseller($id_supplier1);
107
#FIXME: DelBookSeller always returns undef (if it works or not)
107
is( $del, 1, "DelBookseller returns 1 - 1 supplier has been deleted " );
108
#is( $del, 1, "DelBookseller returns 1 - 1 supplier has been deleted " );
109
is( C4::Bookseller::GetBookSellerFromId($id_supplier1),
108
is( C4::Bookseller::GetBookSellerFromId($id_supplier1),
110
    undef, "Supplier1  has been deleted - id_supplier1 doesnt exist anymore" );
109
    undef, "Supplier1  has been deleted - id_supplier1 doesnt exist anymore" );
111
110
112
- 

Return to bug 10630