Bugzilla – Attachment 40417 Details for
Bug 13853
Show waiting hold expiration date for waiting holds in holds ajax datatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13853: Add tests for is_waiting
Bug-13853-Add-tests-for-iswaiting.patch (text/plain), 1.67 KB, created by
Jonathan Druart
on 2015-06-19 16:23:08 UTC
(
hide
)
Description:
Bug 13853: Add tests for is_waiting
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-06-19 16:23:08 UTC
Size:
1.67 KB
patch
obsolete
>From c44863b7a26b6252178d53f9e8dae8e7f90bc7e1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@koha-community.org> >Date: Fri, 19 Jun 2015 18:16:27 +0200 >Subject: [PATCH] Bug 13853: Add tests for is_waiting > >--- > t/db_dependent/Hold.t | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Hold.t b/t/db_dependent/Hold.t >index 0aa7076..ccd24cd 100755 >--- a/t/db_dependent/Hold.t >+++ b/t/db_dependent/Hold.t >@@ -20,7 +20,7 @@ use Modern::Perl; > use C4::Context; > use Koha::Database; > >-use Test::More tests => 5; >+use Test::More tests => 8; > > use_ok('Koha::Hold'); > >@@ -36,6 +36,8 @@ C4::Context->set_preference( 'ReservesMaxPickUpDelay', '' ); > my $dt = $hold->waiting_expires_on(); > is( $dt, undef, "Koha::Hold->waiting_expires_on returns undef if ReservesMaxPickUpDelay is not set"); > >+is( $hold->is_waiting, 1, 'The hold is waiting' ); >+ > C4::Context->set_preference( 'ReservesMaxPickUpDelay', '5' ); > $dt = $hold->waiting_expires_on(); > is( $dt->ymd, "2000-01-06", "Koha::Hold->waiting_expires_on returns DateTime of waitingdate + ReservesMaxPickUpDelay if set"); >@@ -43,10 +45,12 @@ is( $dt->ymd, "2000-01-06", "Koha::Hold->waiting_expires_on returns DateTime of > $hold->found('T'); > $dt = $hold->waiting_expires_on(); > is( $dt, undef, "Koha::Hold->waiting_expires_on returns undef if found is not 'W' ( Set to 'T' )"); >+isnt( $hold->is_waiting, 1, 'The hold is not waiting (T)' ); > > $hold->found(q{}); > $dt = $hold->waiting_expires_on(); > is( $dt, undef, "Koha::Hold->waiting_expires_on returns undef if found is not 'W' ( Set to empty string )"); >+isnt( $hold->is_waiting, 1, 'The hold is not waiting (W)' ); > > $schema->storage->txn_rollback(); > >-- >2.1.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 13853
:
36949
|
36984
|
39748
|
40026
|
40037
|
40417
|
40673
|
40674
|
40675
|
40755
|
40756
|
40757
|
40758