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

(-)a/t/db_dependent/Koha/Patron/Categories.t (-1 / +10 lines)
Lines 18-28 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
use Test::More tests => 5;
22
use Test::More tests => 5;
23
24
use Koha::Database;
22
use Koha::Patron::Category;
25
use Koha::Patron::Category;
23
use Koha::Patron::Categories;
26
use Koha::Patron::Categories;
24
use t::lib::TestBuilder;
27
use t::lib::TestBuilder;
25
28
29
my $schema = Koha::Database->new->schema;
30
$schema->storage->txn_begin;
31
26
my $builder = t::lib::TestBuilder->new;
32
my $builder = t::lib::TestBuilder->new;
27
my $branch = $builder->build({ source => 'Branch', });
33
my $branch = $builder->build({ source => 'Branch', });
28
my $nb_of_categories = Koha::Patron::Categories->search->count;
34
my $nb_of_categories = Koha::Patron::Categories->search->count;
Lines 45-47 is_deeply( $retrieved_category_1->default_messaging, [], 'By default there is no Link Here
45
51
46
$retrieved_category_1->delete;
52
$retrieved_category_1->delete;
47
is( Koha::Patron::Categories->search->count, $nb_of_categories + 1, 'Delete should have deleted the patron category' );
53
is( Koha::Patron::Categories->search->count, $nb_of_categories + 1, 'Delete should have deleted the patron category' );
48
- 
54
55
$schema->storage->txn_rollback;
56
57
1;

Return to bug 14836