Bugzilla – Attachment 81928 Details for
Bug 20996
Fix API response time on ILL request endpoint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20996: (follow-up) Fix test
Bug-20996-follow-up-Fix-test.patch (text/plain), 2.75 KB, created by
Josef Moravec
on 2018-11-05 08:55:52 UTC
(
hide
)
Description:
Bug 20996: (follow-up) Fix test
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-11-05 08:55:52 UTC
Size:
2.75 KB
patch
obsolete
>From 2c684b75c3fd28a163478f31eca244a4d02306f4 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 5 Nov 2018 08:51:32 +0000 >Subject: [PATCH] Bug 20996: (follow-up) Fix test > >- Fixes the t/db_dependent/Illrequest/Config.t >- Adds tests for Koha::Illrequest::Config->has_branch > >0) Do not apply the path >1) Run test t/db_dependent/Illrequest/Config.t >2) It fails - it is because the Koha/Illrequest/Config.pm prefixes >handling changed >3) Apply the patch >4) Run test again, it should pass now >5) Read through the test code and confirm it makes sense >--- > t/db_dependent/Illrequest/Config.t | 19 +++++++++---------- > 1 file changed, 9 insertions(+), 10 deletions(-) > >diff --git a/t/db_dependent/Illrequest/Config.t b/t/db_dependent/Illrequest/Config.t >index 3f26c6b..b80babd 100644 >--- a/t/db_dependent/Illrequest/Config.t >+++ b/t/db_dependent/Illrequest/Config.t >@@ -410,7 +410,7 @@ subtest '_load_configuration' => sub { > > subtest 'Final tests' => sub { > >- plan tests => 10; >+ plan tests => 9; > > $schema->storage->txn_begin; > >@@ -419,12 +419,11 @@ subtest 'Final tests' => sub { > my $config = Koha::Illrequest::Config->new; > > # getPrefixes (error & undef): >- dies_ok( sub { $config->getPrefixes("FOO") }, "getPrefixes: die if not correct type."); >- is_deeply($config->getPrefixes("brw_cat"), { default => undef}, >- "getPrefixes: Undefined brw_cat prefix is undefined."); >- is_deeply($config->getPrefixes("branch"), { default => undef}, >+ is($config->getPrefixes(), undef, > "getPrefixes: Undefined branch prefix is undefined."); > >+ is($config->has_branch(), undef, "Config does not have branch when no config loaded"); >+ > # getDigitalRecipients (error & undef): > dies_ok( sub { $config->getDigitalRecipients("FOO") }, > "getDigitalRecipients: die if not correct type."); >@@ -449,11 +448,8 @@ subtest 'Final tests' => sub { > ); > > # getPrefixes (values): >- is_deeply($config->getPrefixes("brw_cat"), >- { B => '2-prefix', default => 'DEFAULT-prefix' }, >- "getPrefixes: return configuration brw_cat prefixes."); >- is_deeply($config->getPrefixes("branch"), >- { 1 => 'T-prefix', default => 'DEFAULT-prefix' }, >+ is_deeply($config->getPrefixes(), >+ { '1' => 'T-prefix' }, > "getPrefixes: return configuration branch prefixes."); > > # getDigitalRecipients (values): >@@ -464,6 +460,9 @@ subtest 'Final tests' => sub { > { 2 => 'borrower', default => 'branch' }, > "getDigitalRecipients: return branch digital_recipients."); > >+ # has_branch test >+ ok($config->has_branch(), "has_branch returns true if branch defined in configuration"); >+ > $schema->storage->txn_rollback; > }; > >-- >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 20996
:
76687
|
76688
|
76705
|
77100
|
79379
|
79576
|
79583
|
79584
|
79585
|
79586
|
79587
|
79588
|
79589
|
79590
|
79591
|
79592
|
81715
|
81716
|
81717
|
81718
|
81719
|
81720
|
81747
|
81748
|
81749
|
81750
|
81751
|
81752
|
81753
|
81755
|
81756
|
81757
|
81758
|
81759
|
81760
|
81761
|
81908
|
81909
|
81928
|
81967
|
81994
|
81996
|
81997
|
81998