Bugzilla – Attachment 149046 Details for
Bug 29234
Transfers generated by stock rotation alert but do not initiate at checkin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29234: (QA follow-up) Fix test that expects wrong defaults
Bug-29234-QA-follow-up-Fix-test-that-expects-wrong.patch (text/plain), 2.16 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-03-31 16:34:25 UTC
(
hide
)
Description:
Bug 29234: (QA follow-up) Fix test that expects wrong defaults
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-03-31 16:34:25 UTC
Size:
2.16 KB
patch
obsolete
>From 68501e60f93af8c5f93ec0fd0b10c5b131d1d103 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 31 Mar 2023 18:30:14 +0200 >Subject: [PATCH] Bug 29234: (QA follow-up) Fix test that expects wrong > defaults > >This patch changes the get_items_that_can_fill tests so they explicitly >set a 'datearrived' as the new defaults for fresh transfer objects from >TestBuilder is more sane and has this field undef. Tests *should always* >create their required scenarios explicitly. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Holds.t | 13 +++++++++---- > t/lib/TestBuilder.pm | 2 +- > 2 files changed, 10 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 29e773e3990..c5c79b1d768 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -1738,10 +1738,15 @@ subtest 'Koha::Holds->get_items_that_can_fill returns items with datecancelled o > my $biblio2 = $builder->build_sample_biblio(); > my $item2 = $builder->build_sample_item({ biblionumber => $biblio2->biblionumber }); > >- my $transfer2 = $builder->build_object({ class => "Koha::Item::Transfers", value => { >- datecancelled => undef, >- itemnumber => $item2->itemnumber >- }}); >+ my $transfer2 = $builder->build_object( >+ { class => "Koha::Item::Transfers", >+ value => { >+ datearrived => dt_from_string, >+ datecancelled => undef, >+ itemnumber => $item2->itemnumber >+ } >+ } >+ ); > > my $hold2 = $builder->build_object({ class => 'Koha::Holds', value => { > biblionumber => $biblio2->biblionumber, >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index 59137b143ee..d393cc8e8c8 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -592,7 +592,7 @@ sub _gen_default_values { > }, > Branchtransfer => { > daterequested => dt_from_string(), >- datesent => dt_from_string(), >+ datesent => undef, > datearrived => undef, > datecancelled => undef, > reason => undef, >-- >2.40.0
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 29234
:
126267
|
126269
|
126300
|
126481
|
148751
|
148752
| 149046 |
149093
|
149094
|
149095
|
149096