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

(-)a/Koha/Patron.pm (-1 / +1 lines)
Lines 196-202 sub store { Link Here
196
196
197
            # Set surname to uppercase if uppercasesurname is true
197
            # Set surname to uppercase if uppercasesurname is true
198
            $self->surname( uc($self->surname) )
198
            $self->surname( uc($self->surname) )
199
                if C4::Context->preference("uppercasesurname");
199
                if C4::Context->preference("uppercasesurnames");
200
200
201
            unless ( $self->in_storage ) {    #AddMember
201
            unless ( $self->in_storage ) {    #AddMember
202
202
(-)a/t/db_dependent/Koha/Patrons.t (-4 / +3 lines)
Lines 1704-1716 subtest '->store' => sub { Link Here
1704
    $patron_1->surname('xxx')->store;
1704
    $patron_1->surname('xxx')->store;
1705
    is( $patron_1->password, $digest, 'Password should not have changed on ->store');
1705
    is( $patron_1->password, $digest, 'Password should not have changed on ->store');
1706
1706
1707
    # Test uppercasesurname
1707
    # Test uppercasesurnames
1708
    t::lib::Mocks::mock_preference( 'uppercasesurname', 1 );
1708
    t::lib::Mocks::mock_preference( 'uppercasesurnames', 1 );
1709
    my $surname = lc $patron_1->surname;
1709
    my $surname = lc $patron_1->surname;
1710
    $patron_1->surname($surname)->store;
1710
    $patron_1->surname($surname)->store;
1711
    isnt( $patron_1->surname, $surname,
1711
    isnt( $patron_1->surname, $surname,
1712
        'Surname converts to uppercase on store.');
1712
        'Surname converts to uppercase on store.');
1713
    t::lib::Mocks::mock_preference( 'uppercasesurname', 0 );
1713
    t::lib::Mocks::mock_preference( 'uppercasesurnames', 0 );
1714
    $patron_1->surname($surname)->store;
1714
    $patron_1->surname($surname)->store;
1715
    is( $patron_1->surname, $surname,
1715
    is( $patron_1->surname, $surname,
1716
        'Surname remains unchanged on store.');
1716
        'Surname remains unchanged on store.');
1717
- 

Return to bug 23688