|
Lines 359-365
subtest 'Backend testing (mocks)' => sub {
Link Here
|
| 359 |
|
359 |
|
| 360 |
subtest 'Backend core methods' => sub { |
360 |
subtest 'Backend core methods' => sub { |
| 361 |
|
361 |
|
| 362 |
plan tests => 18; |
362 |
plan tests => 17; |
| 363 |
|
363 |
|
| 364 |
$schema->storage->txn_begin; |
364 |
$schema->storage->txn_begin; |
| 365 |
|
365 |
|
|
Lines 407-427
subtest 'Backend core methods' => sub {
Link Here
|
| 407 |
{ stage => 'bar', method => 'create' }, |
407 |
{ stage => 'bar', method => 'create' }, |
| 408 |
{ stage => 'commit', method => 'create' }, |
408 |
{ stage => 'commit', method => 'create' }, |
| 409 |
{ stage => 'commit', method => 'create' }); |
409 |
{ stage => 'commit', method => 'create' }); |
| 410 |
# Test Copyright Clearance |
|
|
| 411 |
t::lib::Mocks::mock_preference("ILLModuleCopyrightClearance", "Test Copyright Clearance."); |
| 412 |
is_deeply($illrq->backend_create({test => 1}), |
| 413 |
{ |
| 414 |
error => 0, |
| 415 |
status => '', |
| 416 |
message => '', |
| 417 |
method => 'create', |
| 418 |
stage => 'copyrightclearance', |
| 419 |
value => { |
| 420 |
backend => "Mock" |
| 421 |
} |
| 422 |
}, |
| 423 |
"Backend create: copyright clearance."); |
| 424 |
t::lib::Mocks::mock_preference("ILLModuleCopyrightClearance", ""); |
| 425 |
# Test non-commit |
410 |
# Test non-commit |
| 426 |
is_deeply($illrq->backend_create({test => 1}), |
411 |
is_deeply($illrq->backend_create({test => 1}), |
| 427 |
{ |
412 |
{ |
| 428 |
- |
|
|