Bugzilla – Attachment 137144 Details for
Bug 29958
Missing dateaccessioned is set to today when storing an item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29958: Regression tests
Bug-29958-Regression-tests.patch (text/plain), 1.44 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-07-05 12:15:58 UTC
(
hide
)
Description:
Bug 29958: Regression tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-07-05 12:15:58 UTC
Size:
1.44 KB
patch
obsolete
>From 3684a53dc328047f5f608d4b3d6b37abcbf30400 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 5 Jul 2022 09:14:16 -0300 >Subject: [PATCH] Bug 29958: Regression tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/Item.t | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index cbe52ed63e..9c3ef01d1c 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -1171,7 +1171,31 @@ subtest 'columns_to_str' => sub { > > subtest 'store() tests' => sub { > >- plan tests => 2; >+ plan tests => 3; >+ >+ subtest 'dateaccessioned handling' => sub { >+ >+ plan tests => 3; >+ >+ $schema->storage->txn_begin; >+ >+ my $item = $builder->build_sample_item; >+ >+ ok( defined $item->dateaccessioned, 'dateaccessioned is set' ); >+ >+ # reset dateaccessioned on the DB >+ $schema->resultset('Item')->find({ itemnumber => $item->id })->update({ dateaccessioned => undef }); >+ $item->discard_changes; >+ >+ ok( !defined $item->dateaccessioned ); >+ >+ # update something >+ $item->replacementprice(100)->store->discard_changes; >+ >+ ok( !defined $item->dateaccessioned, 'dateaccessioned not set on update if undefined' ); >+ >+ $schema->storage->txn_rollback; >+ }; > > subtest '_set_found_trigger() tests' => sub { > >-- >2.34.1
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 29958
:
136504
|
136555
|
137052
| 137144 |
137145