Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 42; |
22 |
use Test::More tests => 44; |
|
|
23 |
use Test::Warn; |
23 |
|
24 |
|
24 |
use Koha::Database; |
25 |
use Koha::Database; |
25 |
|
26 |
|
Lines 280-285
subtest 'Auto-increment values tests' => sub {
Link Here
|
280 |
|
281 |
|
281 |
}; |
282 |
}; |
282 |
|
283 |
|
|
|
284 |
# Test to make sure build() warns user of unknown parameters. |
285 |
warnings_are { |
286 |
$builder->build({ |
287 |
source => 'Branch', |
288 |
values => { |
289 |
branchcode => 'BRANCH_1' |
290 |
} |
291 |
}) |
292 |
} [], "No warnings on correct use"; |
293 |
|
294 |
warnings_like { |
295 |
$builder->build({ |
296 |
source => 'Branch', |
297 |
branchcode => 'BRANCH_2' # This is wrong! |
298 |
}) |
299 |
} qr/unknown param/i, "Carp unknown parameters"; |
300 |
|
283 |
$schema->storage->txn_rollback; |
301 |
$schema->storage->txn_rollback; |
284 |
|
302 |
|
285 |
1; |
303 |
1; |
286 |
- |
|
|