Bugzilla – Attachment 96833 Details for
Bug 24329
Patron cardnumber change times are lost during upgrade for bug 3820
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24329: Add a test
Bug-24329-Add-a-test.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2020-01-05 22:09:28 UTC
(
hide
)
Description:
Bug 24329: Add a test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-01-05 22:09:28 UTC
Size:
1.52 KB
patch
obsolete
>From be086e0e2cf0b06cf0e95be85863a676015eff42 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 5 Jan 2020 23:08:28 +0100 >Subject: [PATCH] Bug 24329: Add a test > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/ActionLogs.t | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/ActionLogs.t b/t/db_dependent/Koha/ActionLogs.t >index 894c8afd5d..24bce1b7ea 100644 >--- a/t/db_dependent/Koha/ActionLogs.t >+++ b/t/db_dependent/Koha/ActionLogs.t >@@ -22,6 +22,7 @@ use Test::More tests => 3; > use C4::Context; > use C4::Log; > use Koha::Database; >+use Koha::DateUtils qw( dt_from_string ); > > use t::lib::TestBuilder; > >@@ -33,7 +34,7 @@ my $schema = Koha::Database->new->schema; > my $builder = t::lib::TestBuilder->new; > > subtest 'store() tests' => sub { >- plan tests => 2; >+ plan tests => 3; > > $schema->storage->txn_begin; > >@@ -48,6 +49,12 @@ subtest 'store() tests' => sub { > is( ref($log), 'Koha::ActionLog', 'Log object creation success'); > is( Koha::ActionLogs->count, $logs_count + 1, 'Exactly one log was saved'); > >+ my $yesterday = dt_from_string->subtract( days => 1 ); >+ $log->timestamp($yesterday)->store; >+ $log->info("a new info")->store; # Must be 2 different store calls >+ is( dt_from_string( $log->get_from_storage->timestamp ), $yesterday, >+ 'timestamp column should not be updated to current_timestamp' ); >+ > $schema->storage->txn_rollback; > }; > >-- >2.11.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 24329
:
96739
|
96740
|
96775
|
96776
|
96831
|
96832
| 96833