Bugzilla – Attachment 64587 Details for
Bug 18672
Creation Date and Modification Date are the same for a list in the Lists Module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18672: [QA Follow-up] Simplify without sleep
Bug-18672-QA-Follow-up-Simplify-without-sleep.patch (text/plain), 1.79 KB, created by
Marcel de Rooy
on 2017-06-23 10:37:00 UTC
(
hide
)
Description:
Bug 18672: [QA Follow-up] Simplify without sleep
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-06-23 10:37:00 UTC
Size:
1.79 KB
patch
obsolete
>From 8a754b6512b0261a36c2e1e6ec33aab066dcdc3b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 23 Jun 2017 12:33:26 +0200 >Subject: [PATCH] Bug 18672: [QA Follow-up] Simplify without sleep >Content-Type: text/plain; charset=utf-8 > >Set the creation date one hour back, store and check again. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Virtualshelves.t | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Virtualshelves.t b/t/db_dependent/Virtualshelves.t >index 809b10f..5b5f74f 100644 >--- a/t/db_dependent/Virtualshelves.t >+++ b/t/db_dependent/Virtualshelves.t >@@ -44,16 +44,15 @@ subtest 'CRUD' => sub { > is( $shelf->allow_delete_other, 0, 'The default value for allow_delete_other should be 0' ); > is( output_pref($shelf->created_on), output_pref(dt_from_string), 'The creation time should have been set to today' ); > >- my $shelf_18672 = Koha::Virtualshelves->find( $shelf->shelfnumber ); # Bug 18672 >- my $created_18672 = $shelf_18672->created_on; >- sleep 2; # Wait 2 seconds, then store >+ # Test if creation date will not be overwritten by store >+ my $created = dt_from_string->subtract( hours => 1 ); >+ $shelf->created_on( $created ); > $shelf->store; >- $shelf_18672 = Koha::Virtualshelves->find( $shelf->shelfnumber ); >- is($shelf_18672->created_on, $created_18672, 'Creation date is the same after update (Bug 18672)' ); > > my $retrieved_shelf = Koha::Virtualshelves->find( $shelf->shelfnumber ); > > is( $retrieved_shelf->shelfname, $shelf->shelfname, 'Find should correctly return the shelfname' ); >+ is( dt_from_string($retrieved_shelf->created_on), $created, 'Creation date is the same after update (Bug 18672)' ); > > # Insert with the same name > eval { >-- >2.1.4
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 18672
:
63720
|
63781
|
63782
|
64063
|
64585
|
64586
|
64587
|
64994
|
64995
|
64996