Lines 1526-1532
subtest 'Test Koha::Patrons::merge' => sub {
Link Here
|
1526 |
}; |
1526 |
}; |
1527 |
|
1527 |
|
1528 |
subtest '->store' => sub { |
1528 |
subtest '->store' => sub { |
1529 |
plan tests => 3; |
1529 |
plan tests => 5; |
1530 |
my $schema = Koha::Database->new->schema; |
1530 |
my $schema = Koha::Database->new->schema; |
1531 |
$schema->storage->txn_begin; |
1531 |
$schema->storage->txn_begin; |
1532 |
|
1532 |
|
Lines 1550-1555
subtest '->store' => sub {
Link Here
|
1550 |
$patron_1->surname('xxx')->store; |
1550 |
$patron_1->surname('xxx')->store; |
1551 |
is( $patron_1->password, $digest, 'Password should not have changed on ->store'); |
1551 |
is( $patron_1->password, $digest, 'Password should not have changed on ->store'); |
1552 |
|
1552 |
|
|
|
1553 |
# Test uppercasesurname |
1554 |
t::lib::Mocks::mock_preference( 'uppercasesurname', 1 ); |
1555 |
my $surname = lc $patron_1->surname; |
1556 |
$patron_1->surname($surname)->store; |
1557 |
isnt( $patron_1->surname, $surname, |
1558 |
'Surname converts to uppercase on store.'); |
1559 |
t::lib::Mocks::mock_preference( 'uppercasesurname', 0 ); |
1560 |
$patron_1->surname($surname)->store; |
1561 |
is( $patron_1->surname, $surname, |
1562 |
'Surname remains unchanged on store.'); |
1563 |
|
1553 |
$schema->storage->dbh->{PrintError} = $print_error; |
1564 |
$schema->storage->dbh->{PrintError} = $print_error; |
1554 |
$schema->storage->txn_rollback; |
1565 |
$schema->storage->txn_rollback; |
1555 |
}; |
1566 |
}; |
1556 |
- |
|
|