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

(-)a/t/db_dependent/Koha/Patrons.t (-3 / +2 lines)
Lines 2028-2034 subtest 'extended_attributes' => sub { Link Here
2028
    my $patron_1 = $builder->build_object({class=> 'Koha::Patrons'});
2028
    my $patron_1 = $builder->build_object({class=> 'Koha::Patrons'});
2029
    my $patron_2 = $builder->build_object({class=> 'Koha::Patrons'});
2029
    my $patron_2 = $builder->build_object({class=> 'Koha::Patrons'});
2030
2030
2031
    set_logged_in_user($patron_1);
2031
    t::lib::Mocks::mock_userenv({ patron => $patron_1 });
2032
2032
2033
    my $attribute_type1 = Koha::Patron::Attribute::Type->new(
2033
    my $attribute_type1 = Koha::Patron::Attribute::Type->new(
2034
        {
2034
        {
Lines 2103-2109 subtest 'extended_attributes' => sub { Link Here
2103
    is( $non_existent, undef, 'Koha::Patron->get_extended_attribute must return undef if the attribute does not exist' );
2103
    is( $non_existent, undef, 'Koha::Patron->get_extended_attribute must return undef if the attribute does not exist' );
2104
2104
2105
    # Test branch limitations
2105
    # Test branch limitations
2106
    set_logged_in_user($patron_2);
2106
    t::lib::Mocks::mock_userenv({ patron => $patron_2 });
2107
    # Return all
2107
    # Return all
2108
    $extended_attributes_for_1 = $patron_1->extended_attributes;
2108
    $extended_attributes_for_1 = $patron_1->extended_attributes;
2109
    is( $extended_attributes_for_1->count, 3, 'There should be 2 attributes for patron 1, the limited one should be returned');
2109
    is( $extended_attributes_for_1->count, 3, 'There should be 2 attributes for patron 1, the limited one should be returned');
2110
- 

Return to bug 20443