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

(-)a/t/Patroncards_Layout.t (-14 lines)
Lines 1-14 Link Here
1
#!/usr/bin/perl
2
#
3
# This Koha test module is a stub!  
4
# Add more tests here!!!
5
6
use strict;
7
use warnings;
8
9
use Test::More tests => 1;
10
11
BEGIN {
12
        use_ok('C4::Patroncards::Layout');
13
}
14
(-)a/t/db_dependent/Patroncards.t (-1 / +34 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 3 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, see <http://www.gnu.org/licenses>.
16
17
use Modern::Perl;
18
use Test::More tests => 1;
19
use Test::MockModule;
20
use t::lib::Mocks;
21
use t::lib::TestBuilder;
22
23
use C4::Patroncards::Layout;
24
25
subtest '->save' => sub {
26
    plan tests => 1;
27
    my $layout = C4::Patroncards::Layout->new(
28
        layout_name => "new patron card",
29
        layout_id   => '', # The interface send an empty string
30
        layout_xml  => 'some_xml'
31
    );
32
    my $layout_id = $layout->save;
33
    ok($layout_id > 0, 'A layout_id should have been returned on ->save');
34
};

Return to bug 22878