|
Lines 130-136
subtest '_handle_008_field' => sub {
Link Here
|
| 130 |
|
130 |
|
| 131 |
$schema->storage->txn_begin; |
131 |
$schema->storage->txn_begin; |
| 132 |
|
132 |
|
| 133 |
# Add our test quote file to the database for testing against |
133 |
# Add our test quote file to the database for testing against |
| 134 |
my $account = $builder->build( |
134 |
my $account = $builder->build( |
| 135 |
{ |
135 |
{ |
| 136 |
source => 'VendorEdiAccount', |
136 |
source => 'VendorEdiAccount', |
|
Lines 190-205
subtest '_handle_008_field' => sub {
Link Here
|
| 190 |
|
190 |
|
| 191 |
# Tests for generated basket for passed quote file |
191 |
# Tests for generated basket for passed quote file |
| 192 |
my $baskets = Koha::Acquisition::Baskets->search( { booksellerid => $account->{vendor_id} } ); |
192 |
my $baskets = Koha::Acquisition::Baskets->search( { booksellerid => $account->{vendor_id} } ); |
| 193 |
my $basket = $baskets->next; |
193 |
my $basket = $baskets->next; |
| 194 |
|
194 |
|
| 195 |
my $orders = $basket->orders; |
195 |
my $orders = $basket->orders; |
| 196 |
my $order = $orders->next; |
196 |
my $order = $orders->next; |
| 197 |
|
197 |
|
| 198 |
my $biblio = $order->biblio; |
198 |
my $biblio = $order->biblio; |
| 199 |
my $record = $biblio->record; |
199 |
my $record = $biblio->record; |
| 200 |
my $record_field = $record->field('008'); |
200 |
my $record_field = $record->field('008'); |
| 201 |
|
201 |
|
| 202 |
is(exists($record_field->{_data}), 1, 'Field has been added'); |
202 |
is( exists( $record_field->{_data} ), 1, 'Field has been added' ); |
| 203 |
|
203 |
|
| 204 |
# Test without calling the 008 handler |
204 |
# Test without calling the 008 handler |
| 205 |
$account = $builder->build( |
205 |
$account = $builder->build( |
|
Lines 288-291
subtest '_handle_008_field' => sub {
Link Here
|
| 288 |
is( $record_field->{_data}, undef, 'Field has not been added' ); |
288 |
is( $record_field->{_data}, undef, 'Field has not been added' ); |
| 289 |
|
289 |
|
| 290 |
$schema->storage->txn_rollback; |
290 |
$schema->storage->txn_rollback; |
| 291 |
} |
291 |
} |
| 292 |
- |
|
|