Bugzilla – Attachment 157171 Details for
Bug 10762
Make it possible to adjust the barcode height and width on labels
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10762: (follow-up) Add tests
Bug-10762-follow-up-Add-tests.patch (text/plain), 1.86 KB, created by
Katrin Fischer
on 2023-10-14 21:42:21 UTC
(
hide
)
Description:
Bug 10762: (follow-up) Add tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-10-14 21:42:21 UTC
Size:
1.86 KB
patch
obsolete
>From 5b0278e0632ed1bb41128aa9b9f784df889b3ec7 Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Wed, 16 Aug 2023 10:07:23 +0000 >Subject: [PATCH] Bug 10762: (follow-up) Add tests > >Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Labels/t_Label.t | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Labels/t_Label.t b/t/db_dependent/Labels/t_Label.t >index 0d69d05312..a923e95e10 100755 >--- a/t/db_dependent/Labels/t_Label.t >+++ b/t/db_dependent/Labels/t_Label.t >@@ -20,7 +20,7 @@ > > use Modern::Perl; > >-use Test::More tests => 4; >+use Test::More tests => 6; > use t::lib::TestBuilder; > use t::lib::Mocks; > >@@ -99,6 +99,8 @@ my $dummy_template_values = { > row_gap => 0, > units => 'INCH', > template_stat => 1, >+ barcode_width => 0.8, >+ barcode_height => 0.01 > }; > > my $label_info = { >@@ -122,9 +124,13 @@ my $label_info = { > label_width => $dummy_template_values->{'label_width'}, > left_text_margin => $dummy_template_values->{'left_text_margin'} > ), >+ scale_width => $dummy_template_values->{barcode_width}, >+ scale_height => $dummy_template_values->{barcode_height}, > }; > > my $format_string = '100a 245a'; >+my $barcode_width = $label_info->{scale_width} * $label_info->{width}; >+my $barcode_height = $label_info->{scale_height} * $label_info->{height}; > my $label = C4::Labels::Label->new(%$label_info, format_string => $format_string); > my $label_text = $label->create_label(); > ok( defined $label_text, 'Label Text Value defined.' ); >@@ -142,6 +148,8 @@ is_deeply( > sprintf( "%s %s", $item->enumchron, $item->copynumber ) > ] > ); >+is($barcode_width, '2.104',); >+is($barcode_height, '0.01',); > > $schema->storage->txn_rollback(); > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10762
:
127729
|
134754
|
144900
|
144933
|
144939
|
144940
|
144941
|
154456
|
154457
|
154458
|
154459
|
154559
|
154560
|
154561
|
154562
|
157168
|
157169
|
157170
| 157171 |
157172
|
157999
|
158014