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

(-)a/t/db_dependent/Koha/Patrons.t (-2 / +9 lines)
Lines 1427-1433 subtest 'Test Koha::Patrons::merge' => sub { Link Here
1427
};
1427
};
1428
1428
1429
subtest '->store' => sub {
1429
subtest '->store' => sub {
1430
    plan tests => 1;
1430
    plan tests => 3;
1431
    my $schema = Koha::Database->new->schema;
1431
    my $schema = Koha::Database->new->schema;
1432
    $schema->storage->txn_begin;
1432
    $schema->storage->txn_begin;
1433
1433
Lines 1442-1447 subtest '->store' => sub { Link Here
1442
        'Koha::Exceptions::Object::DuplicateID',
1442
        'Koha::Exceptions::Object::DuplicateID',
1443
        'Koha::Patron->store raises an exception on duplicate ID';
1443
        'Koha::Patron->store raises an exception on duplicate ID';
1444
1444
1445
    # Test password
1446
    my $password = 'password';
1447
    $patron_1->password($password)->store;
1448
    like( $patron_1->password, qr|^\$2|, 'Password should be hashed using bcrypt (start with $2)' );
1449
    my $digest = $patron_1->password;
1450
    $patron_1->surname('xxx')->store;
1451
    is( $patron_1->password, $digest, 'Password should not have changed on ->store');
1452
1445
    $schema->storage->dbh->{PrintError} = $print_error;
1453
    $schema->storage->dbh->{PrintError} = $print_error;
1446
    $schema->storage->txn_rollback;
1454
    $schema->storage->txn_rollback;
1447
};
1455
};
1448
- 

Return to bug 21087