|
Lines 44-56
subtest 'extended_attributes patrons join searches() tests' => sub {
Link Here
|
| 44 |
my $attribute_type_1 = $builder->build( |
44 |
my $attribute_type_1 = $builder->build( |
| 45 |
{ |
45 |
{ |
| 46 |
source => 'BorrowerAttributeType', |
46 |
source => 'BorrowerAttributeType', |
| 47 |
value => { repeatable => 1, is_date => 0, code => 'CODE_1' }, |
47 |
value => { repeatable => 1, is_date => 0, code => 'CODE_1' }, |
| 48 |
} |
48 |
} |
| 49 |
); |
49 |
); |
| 50 |
my $attribute_type_2 = $builder->build( |
50 |
my $attribute_type_2 = $builder->build( |
| 51 |
{ |
51 |
{ |
| 52 |
source => 'BorrowerAttributeType', |
52 |
source => 'BorrowerAttributeType', |
| 53 |
value => { repeatable => 1, is_date => 0, code => 'CODE_2' } |
53 |
value => { repeatable => 1, is_date => 0, code => 'CODE_2' } |
| 54 |
} |
54 |
} |
| 55 |
); |
55 |
); |
| 56 |
|
56 |
|
|
Lines 71-77
subtest 'extended_attributes patrons join searches() tests' => sub {
Link Here
|
| 71 |
|
71 |
|
| 72 |
my $patrons_search = Koha::Patrons->search( |
72 |
my $patrons_search = Koha::Patrons->search( |
| 73 |
[ |
73 |
[ |
| 74 |
'-and'=>[ |
74 |
'-and' => [ |
| 75 |
{ |
75 |
{ |
| 76 |
'extended_attributes.attribute' => { 'like' => '%Bar%' }, |
76 |
'extended_attributes.attribute' => { 'like' => '%Bar%' }, |
| 77 |
'extended_attributes.code' => $attr1->code |
77 |
'extended_attributes.code' => $attr1->code |
|
Lines 105-111
subtest 'extended_attributes patrons join searches() tests' => sub {
Link Here
|
| 105 |
|
105 |
|
| 106 |
is( $patrons_search2->count, 0, "Second patrons extended_attribute 'AND' query works." ); |
106 |
is( $patrons_search2->count, 0, "Second patrons extended_attribute 'AND' query works." ); |
| 107 |
|
107 |
|
| 108 |
|
|
|
| 109 |
my $patrons_search3 = Koha::Patrons->search( |
108 |
my $patrons_search3 = Koha::Patrons->search( |
| 110 |
[ |
109 |
[ |
| 111 |
[ |
110 |
[ |
| 112 |
- |
|
|