From 9767b4a3b83175870ac45a0da031ab9bba6383f7 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Fri, 28 Nov 2025 10:54:01 +0000 Subject: [PATCH] Bug 41330: Unit tests Do not apply patches before 1 - Create a new subscription to a serial 2 - Go to 'Serial Collection' panel and click on edit serials button 3 - Try and edit the serial number to "{1}" -> error 500 4 - Apply only unit tests patch and run `prove t/Serials/ModSerialStatus.t` -> Tests will not pass 5 - Apply patch and proceed again to 2&3 -> you will get no error 6 - run `prove t/Serials/ModSerialStatus.t` -> tests will pass Signed-off-by: David Nind --- t/Serials/ModSerialStatus.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/Serials/ModSerialStatus.t b/t/Serials/ModSerialStatus.t index 2c1cd6be30..ba0041eb2b 100755 --- a/t/Serials/ModSerialStatus.t +++ b/t/Serials/ModSerialStatus.t @@ -23,7 +23,7 @@ use Modern::Perl; use Data::Dumper qw/Dumper/; use Test::NoWarnings; -use Test::More tests => 9; +use Test::More tests => 10; use C4::Serials; @@ -33,6 +33,7 @@ is( C4::Serials::_handle_seqno( '2017 (No. 8)', $list ), $list, is( C4::Serials::_handle_seqno( '2017 (No. 9)', $list ), $list, 'Not added 9' ); is( C4::Serials::_handle_seqno( '2017 (No. 10)', $list ), $list, 'Not added 10' ); is( C4::Serials::_handle_seqno( '2017 (No. 11)', $list ), $list . '; 2017 (No. 11)', 'Added 11' ); +is( C4::Serials::_handle_seqno( '{1}', $list ), $list . '; {1}', 'Added {1}' ); is( C4::Serials::_handle_seqno( '2017 (No. 7)', $list, 'REMOVE' ), $list, 'Not removed 7' ); is( C4::Serials::_handle_seqno( '2017 (No. 10)', $list, 'REMOVE' ) !~ /\(10\)/, 1, 'Removed 10' ); is( C4::Serials::_handle_seqno( '2017 (No. 8)', $list, 'CHECK' ), 1, 'Found 8' ); -- 2.39.5