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

(-)a/t/db_dependent/Koha/Patrons.t (-2 / +12 lines)
Lines 1584-1590 subtest 'Test Koha::Patrons::merge' => sub { Link Here
1584
};
1584
};
1585
1585
1586
subtest '->store' => sub {
1586
subtest '->store' => sub {
1587
    plan tests => 3;
1587
    plan tests => 5;
1588
    my $schema = Koha::Database->new->schema;
1588
    my $schema = Koha::Database->new->schema;
1589
    $schema->storage->txn_begin;
1589
    $schema->storage->txn_begin;
1590
1590
Lines 1608-1613 subtest '->store' => sub { Link Here
1608
    $patron_1->surname('xxx')->store;
1608
    $patron_1->surname('xxx')->store;
1609
    is( $patron_1->password, $digest, 'Password should not have changed on ->store');
1609
    is( $patron_1->password, $digest, 'Password should not have changed on ->store');
1610
1610
1611
    # Test uppercasesurname
1612
    t::lib::Mocks::mock_preference( 'uppercasesurname', 1 );
1613
    my $surname = lc $patron_1->surname;
1614
    $patron_1->surname($surname)->store;
1615
    isnt( $patron_1->surname, $surname,
1616
        'Surname converts to uppercase on store.');
1617
    t::lib::Mocks::mock_preference( 'uppercasesurname', 0 );
1618
    $patron_1->surname($surname)->store;
1619
    is( $patron_1->surname, $surname,
1620
        'Surname remains unchanged on store.');
1621
1611
    $schema->storage->dbh->{PrintError} = $print_error;
1622
    $schema->storage->dbh->{PrintError} = $print_error;
1612
    $schema->storage->txn_rollback;
1623
    $schema->storage->txn_rollback;
1613
};
1624
};
1614
- 

Return to bug 23199