Bugzilla – Attachment 52220 Details for
Bug 16443
C4::Members::Statistics is not plack safe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16443: [QA Follow-up] Add two tests for get_fields
Bug-16443-QA-Follow-up-Add-two-tests-for-getfields.patch (text/plain), 1.45 KB, created by
Marcel de Rooy
on 2016-06-10 10:05:55 UTC
(
hide
)
Description:
Bug 16443: [QA Follow-up] Add two tests for get_fields
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-06-10 10:05:55 UTC
Size:
1.45 KB
patch
obsolete
>From 94d6a9c0c5e76a5deddef0aab7dd34f91d8ff7f6 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 10 Jun 2016 11:49:45 +0200 >Subject: [PATCH] Bug 16443: [QA Follow-up] Add two tests for get_fields >Content-Type: text/plain; charset=utf-8 > >Adds t/db_dependent/Members/Statistics.t. > >Test plan: >Run the test. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Members/Statistics.t | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > create mode 100644 t/db_dependent/Members/Statistics.t > >diff --git a/t/db_dependent/Members/Statistics.t b/t/db_dependent/Members/Statistics.t >new file mode 100644 >index 0000000..fe0ca9b >--- /dev/null >+++ b/t/db_dependent/Members/Statistics.t >@@ -0,0 +1,20 @@ >+use Modern::Perl; >+use Test::More tests => 2; >+ >+# Please add more tests here !! >+ >+use t::lib::Mocks; >+ >+use C4::Members::Statistics; >+use Koha::Database; # we need the db here; get_fields looks for the item columns >+ >+my $schema = Koha::Database->schema; >+$schema->storage->txn_begin; >+ >+t::lib::Mocks::mock_preference( 'StatisticsFields', undef ); >+is( C4::Members::Statistics::get_fields(), 'location|itype|ccode', 'Check default' ); >+ >+t::lib::Mocks::mock_preference( 'StatisticsFields', 'barcode|garbagexxx|itemcallnumber|notexistent' ); >+is( C4::Members::Statistics::get_fields(), 'barcode|itemcallnumber', 'Check if wrong item fields were removed by get_fields' ); >+ >+$schema->storage->txn_rollback; >-- >1.7.10.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 16443
:
51220
|
51322
|
52219
| 52220