Bugzilla – Attachment 161075 Details for
Bug 35107
ILL - Type disclaimer value and date should be visible under "Request details" in the manage request page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35107: Add tests
Bug-35107-Add-tests.patch (text/plain), 2.52 KB, created by
Kyle M Hall (khall)
on 2024-01-16 19:30:41 UTC
(
hide
)
Description:
Bug 35107: Add tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-01-16 19:30:41 UTC
Size:
2.52 KB
patch
obsolete
>From dcb84e7d6efefd81b8b10326c73ba2fa8d0718a0 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 27 Nov 2023 14:31:59 +0000 >Subject: [PATCH] Bug 35107: Add tests > >prove t/db_dependent/Koha/Illrequest.t > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Koha/Illrequest.t | 66 +++++++++++++++++++++++++++++++- > 1 file changed, 65 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Illrequest.t b/t/db_dependent/Koha/Illrequest.t >index 2c48fc82534..d717963ec84 100755 >--- a/t/db_dependent/Koha/Illrequest.t >+++ b/t/db_dependent/Koha/Illrequest.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 1; >+use Test::More tests => 3; > > use Koha::Illrequests; > >@@ -48,3 +48,67 @@ subtest 'patron() tests' => sub { > > $schema->storage->txn_rollback; > }; >+ >+subtest 'get_type_disclaimer_value() tests' => sub { >+ >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ my $request = $builder->build_object( { class => 'Koha::Illrequests' } ); >+ >+ is( >+ $request->get_type_disclaimer_value, undef, >+ 'get_type_disclaimer_value() returns undef if no get_type_disclaimer_value is set' >+ ); >+ >+ $builder->build_object( >+ { >+ class => 'Koha::Illrequestattributes', >+ value => { >+ illrequest_id => $request->illrequest_id, >+ type => 'type_disclaimer_value', >+ value => 'Yes' >+ } >+ } >+ ); >+ >+ is( >+ $request->get_type_disclaimer_value, "Yes", >+ 'get_type_disclaimer_value() returns the value if is set' >+ ); >+ >+ $schema->storage->txn_rollback; >+}; >+ >+subtest 'get_type_disclaimer_date() tests' => sub { >+ >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ my $request = $builder->build_object( { class => 'Koha::Illrequests' } ); >+ >+ is( >+ $request->get_type_disclaimer_date, undef, >+ 'get_type_disclaimer_date() returns undef if no get_type_disclaimer_date is set' >+ ); >+ >+ $builder->build_object( >+ { >+ class => 'Koha::Illrequestattributes', >+ value => { >+ illrequest_id => $request->illrequest_id, >+ type => 'type_disclaimer_date', >+ value => '2023-11-27T14:27:01' >+ } >+ } >+ ); >+ >+ is( >+ $request->get_type_disclaimer_date, "2023-11-27T14:27:01", >+ 'get_type_disclaimer_date() returns the value if is set' >+ ); >+ >+ $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 35107
:
157438
|
158072
|
159271
|
159272
|
161073
|
161074
| 161075 |
163795