Bugzilla – Attachment 72166 Details for
Bug 20199
Letters.t does not pass with new SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20199: Add tests for Koha::Acq::Order->store
Bug-20199-Add-tests-for-KohaAcqOrder-store.patch (text/plain), 2.00 KB, created by
Katrin Fischer
on 2018-02-23 22:10:28 UTC
(
hide
)
Description:
Bug 20199: Add tests for Koha::Acq::Order->store
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-02-23 22:10:28 UTC
Size:
2.00 KB
patch
obsolete
>From 25701f0b648c3e0fc585e0e6ee357c984c397a64 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 14 Feb 2018 14:13:15 -0300 >Subject: [PATCH] Bug 20199: Add tests for Koha::Acq::Order->store > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Koha/Acquisition/Order.t | 42 ++++++++++++++++++++++++++++++++- > 1 file changed, 41 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Acquisition/Order.t b/t/db_dependent/Koha/Acquisition/Order.t >index f597453f8d..ed9ebc0c48 100644 >--- a/t/db_dependent/Koha/Acquisition/Order.t >+++ b/t/db_dependent/Koha/Acquisition/Order.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 1; >+use Test::More tests => 2; > > use t::lib::TestBuilder; > use t::lib::Mocks; >@@ -55,3 +55,43 @@ subtest 'basket() tests' => sub { > > $schema->storage->txn_rollback; > }; >+ >+subtest 'store' => sub { >+ plan tests => 1; >+ >+ $schema->storage->txn_begin; >+ my $o = $builder->build_object( >+ { >+ class => 'Koha::Acquisition::Orders' >+ } >+ ); >+ >+ subtest 'entrydate' => sub { >+ plan tests => 2; >+ >+ my $order; >+ >+ t::lib::Mocks::mock_preference( 'TimeFormat', '12hr' ); >+ $order = Koha::Acquisition::Order->new( >+ { >+ basketno => $o->basketno, >+ biblionumber => $o->biblionumber, >+ budget_id => $o->budget_id, >+ } >+ )->store; >+ $order->discard_changes; >+ like( $order->entrydate, qr|^\d{4}-\d{2}-\d{2}$| ); >+ >+ t::lib::Mocks::mock_preference( 'TimeFormat', '24hr' ); >+ $order = Koha::Acquisition::Order->new( >+ { >+ basketno => $o->basketno, >+ biblionumber => $o->biblionumber, >+ budget_id => $o->budget_id, >+ } >+ )->store; >+ $order->discard_changes; >+ like( $order->entrydate, qr|^\d{4}-\d{2}-\d{2}$| ); >+ }; >+ $schema->storage->txn_rollback; >+}; >-- >2.14.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 20199
:
71623
|
71624
|
72163
| 72166 |
72167