|
Lines 21-27
Link Here
|
| 21 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
21 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 22 |
|
22 |
|
| 23 |
use Modern::Perl; |
23 |
use Modern::Perl; |
| 24 |
use Test::More tests => 20; |
24 |
use Test::More tests => 21; |
| 25 |
use Test::Exception; |
25 |
use Test::Exception; |
| 26 |
use Test::MockObject; |
26 |
use Test::MockObject; |
| 27 |
use Test::MockModule; |
27 |
use Test::MockModule; |
|
Lines 1637-1642
sub test_renew_desensitize {
Link Here
|
| 1637 |
|
1637 |
|
| 1638 |
} |
1638 |
} |
| 1639 |
|
1639 |
|
|
|
1640 |
subtest 'Test convert_nonprinting_characters' => sub { |
| 1641 |
|
| 1642 |
my $schema = Koha::Database->new->schema; |
| 1643 |
$schema->storage->txn_begin; |
| 1644 |
|
| 1645 |
plan tests => 1; |
| 1646 |
my $msg = |
| 1647 |
qq{64YYYY eng20241030 115433000000000000000000000000AOtDJZ8mxoq|AAF6LO825MxxosppnEpaUQ6a|AEnzsktrzn seoGzB|BLY|CQY|BHUSD|BV0|CC807485965|BDlbbGF5qo AawLbgu5W cD3r4q KVHWEkp KMAEKo en6QWEa5 Ho12sDL5hf|PB20241030|PCTQvaTv45|PIN|AFComment 1\nComment 2\nComment 3|BEZ2f_HGLMji|BFbbV3yXQ}; |
| 1648 |
my $server = { account => { convert_nonprinting_characters => ' -- ' } }; |
| 1649 |
|
| 1650 |
my $output; |
| 1651 |
{ |
| 1652 |
local *STDOUT; |
| 1653 |
open STDOUT, '>', \$output; |
| 1654 |
C4::SIP::Sip::write_msg( undef, $msg, $server ) |
| 1655 |
} |
| 1656 |
|
| 1657 |
like( $output, qr/Comment 1 -- Comment 2 -- Comment 3/, "Response contains converted restriction comment" ); |
| 1658 |
|
| 1659 |
$schema->storage->txn_rollback; |
| 1660 |
}; |
| 1661 |
|
| 1640 |
# Helper routines |
1662 |
# Helper routines |
| 1641 |
|
1663 |
|
| 1642 |
sub create_mocks { |
1664 |
sub create_mocks { |
| 1643 |
- |
|
|