Bugzilla – Attachment 71345 Details for
Bug 12395
Save order line's creator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12395: Add unit test to check created_by is correctly set
Bug-12395-Add-unit-test-to-check-createdby-is-corr.patch (text/plain), 1.62 KB, created by
Julian Maurice
on 2018-02-08 14:10:10 UTC
(
hide
)
Description:
Bug 12395: Add unit test to check created_by is correctly set
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-08 14:10:10 UTC
Size:
1.62 KB
patch
obsolete
>From 1b8a0d41e1cf3689c5f2c21aa999c6cbc1b5fd5c Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 10 Feb 2015 10:23:25 +0100 >Subject: [PATCH] Bug 12395: Add unit test to check created_by is correctly set > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> >--- > t/db_dependent/Acquisition/NewOrder.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Acquisition/NewOrder.t b/t/db_dependent/Acquisition/NewOrder.t >index cee35f7353..322ed5a47a 100644 >--- a/t/db_dependent/Acquisition/NewOrder.t >+++ b/t/db_dependent/Acquisition/NewOrder.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > >-use Test::More tests => 7; >+use Test::More tests => 8; > use C4::Acquisition; > use C4::Biblio; > use C4::Budgets; >@@ -17,6 +17,10 @@ $schema->storage->txn_begin(); > my $dbh = C4::Context->dbh; > $dbh->{RaiseError} = 1; > >+C4::Context->_new_userenv('xxx'); >+C4::Context->set_userenv(42, 'ordercreator', '0042', 'Order', 'Creator', 'CPL', >+ 0, 'ordercreator@example.com'); >+ > my $bookseller = Koha::Acquisition::Bookseller->new( > { > name => "my vendor", >@@ -86,5 +90,6 @@ my $ordernumber = $order->ordernumber; > $order = Koha::Acquisition::Orders->find( $ordernumber ); > is( $order->quantityreceived, 0, 'Koha::Acquisition::Order->insert set quantityreceivedto 0 if undef is given' ); > is( $order->entrydate, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), 'Koha::Acquisition::Order->store set entrydate to today' ); >+is( $order->created_by, 42, 'Koha::Acquisition::Order->store set created_by to logged in user if not given' ); > > $schema->storage->txn_rollback(); >-- >2.14.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 12395
:
28754
|
28943
|
30128
|
30129
|
31409
|
31410
|
31411
|
33837
|
33838
|
33839
|
35769
|
35770
|
35771
|
35772
|
35779
|
35780
|
35781
|
35782
|
35864
|
36063
|
36075
|
36076
|
36077
|
36078
|
36079
|
36080
|
40132
|
40133
|
40134
|
40135
|
40136
|
40137
|
40138
|
40139
|
40161
|
43951
|
45387
|
58745
|
58746
|
58747
|
58748
|
58749
|
58750
|
61383
|
61384
|
71344
|
71345
|
71346
|
71347
|
71348
|
71349
|
72720
|
72721
|
72722
|
72723
|
72724
|
72725
|
74207
|
74208
|
74209
|
74210
|
74211
|
74212
|
74276
|
74277
|
74278
|
74279
|
74280
|
74281
|
74282
|
75900
|
75901
|
75902
|
75903
|
75904
|
75905
|
75906
|
75907
|
76074
|
76075
|
76076
|
76077
|
76078
|
76079
|
76080
|
76081
|
76082
|
76083
|
76084
|
76085
|
76086
|
76087
|
76088
|
76089