Lines 88-94
my @baskets = Koha::Acquisition::Baskets->filter_by_additional_fields([
Link Here
|
88 |
id => $foo->id, |
88 |
id => $foo->id, |
89 |
value => 'foo value for basket1', |
89 |
value => 'foo value for basket1', |
90 |
}, |
90 |
}, |
91 |
]); |
91 |
])->as_list; |
92 |
|
92 |
|
93 |
is(scalar @baskets, 1, 'search returns only one result'); |
93 |
is(scalar @baskets, 1, 'search returns only one result'); |
94 |
is($baskets[0]->basketno, $basket1->basketno, 'result is basket1'); |
94 |
is($baskets[0]->basketno, $basket1->basketno, 'result is basket1'); |
Lines 98-104
is($baskets[0]->basketno, $basket1->basketno, 'result is basket1');
Link Here
|
98 |
id => $foo->id, |
98 |
id => $foo->id, |
99 |
value => 'foo value for basket2', |
99 |
value => 'foo value for basket2', |
100 |
}, |
100 |
}, |
101 |
]); |
101 |
])->as_list; |
102 |
|
102 |
|
103 |
is(scalar @baskets, 1, 'search returns only one result'); |
103 |
is(scalar @baskets, 1, 'search returns only one result'); |
104 |
is($baskets[0]->basketno, $basket2->basketno, 'result is basket2'); |
104 |
is($baskets[0]->basketno, $basket2->basketno, 'result is basket2'); |
Lines 112-118
is($baskets[0]->basketno, $basket2->basketno, 'result is basket2');
Link Here
|
112 |
id => $bar->id, |
112 |
id => $bar->id, |
113 |
value => 'bar value for basket1', |
113 |
value => 'bar value for basket1', |
114 |
}, |
114 |
}, |
115 |
]); |
115 |
])->as_list; |
116 |
|
116 |
|
117 |
is(scalar @baskets, 1, 'search returns only one result'); |
117 |
is(scalar @baskets, 1, 'search returns only one result'); |
118 |
is($baskets[0]->basketno, $basket1->basketno, 'result is basket1'); |
118 |
is($baskets[0]->basketno, $basket1->basketno, 'result is basket1'); |
Lines 126-132
is($baskets[0]->basketno, $basket1->basketno, 'result is basket1');
Link Here
|
126 |
id => $bar->id, |
126 |
id => $bar->id, |
127 |
value => 'bar value for basket2', |
127 |
value => 'bar value for basket2', |
128 |
}, |
128 |
}, |
129 |
]); |
129 |
])->as_list; |
130 |
|
130 |
|
131 |
is(scalar @baskets, 0, 'search returns no result'); |
131 |
is(scalar @baskets, 0, 'search returns no result'); |
132 |
|
132 |
|
Lines 135-141
is(scalar @baskets, 0, 'search returns no result');
Link Here
|
135 |
id => $foo->id, |
135 |
id => $foo->id, |
136 |
value => 'foo', |
136 |
value => 'foo', |
137 |
}, |
137 |
}, |
138 |
]); |
138 |
])->as_list; |
139 |
|
139 |
|
140 |
is(scalar @baskets, 2, 'search returns two results'); |
140 |
is(scalar @baskets, 2, 'search returns two results'); |
141 |
|
141 |
|
Lines 148-154
is(scalar @baskets, 2, 'search returns two results');
Link Here
|
148 |
id => $foo->id, |
148 |
id => $foo->id, |
149 |
value => 'basket1', |
149 |
value => 'basket1', |
150 |
}, |
150 |
}, |
151 |
]); |
151 |
])->as_list; |
152 |
|
152 |
|
153 |
is(scalar @baskets, 1, 'search returns only one result'); |
153 |
is(scalar @baskets, 1, 'search returns only one result'); |
154 |
is($baskets[0]->basketno, $basket1->basketno, 'result is basket1'); |
154 |
is($baskets[0]->basketno, $basket1->basketno, 'result is basket1'); |