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

(-)a/t/db_dependent/Koha/Patron.t (-2 / +24 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 2;
22
use Test::More tests => 3;
23
use Test::Exception;
23
use Test::Exception;
24
24
25
use Koha::Database;
25
use Koha::Database;
Lines 154-156 subtest 'add_enrolment_fee_if_needed() tests' => sub { Link Here
154
        $schema->storage->txn_rollback;
154
        $schema->storage->txn_rollback;
155
    };
155
    };
156
};
156
};
157
- 
157
158
subtest 'is_superlibrarian() tests' => sub {
159
160
    plan tests => 2;
161
162
    $schema->storage->txn_begin;
163
164
    my $patron = $builder->build_object(
165
        {
166
            class => 'Koha::Patrons',
167
            value => {
168
                flags => 16
169
            }
170
        }
171
    );
172
173
    ok( !$patron->is_superlibrarian, 'Patron is not a superlibrarian and the method returns the correct value' );
174
175
    $patron->flags(1)->store->discard_changes;
176
    ok( $patron->is_superlibrarian, 'Patron is a superlibrarian and the method returns the correct value' );
177
178
    $schema->storage->txn_rollback;
179
};

Return to bug 23634