Bugzilla – Attachment 100001 Details for
Bug 24754
UserEnv not set for ISLDI requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24754: Test intranet at the same time
Bug-24754-Test-intranet-at-the-same-time.patch (text/plain), 3.34 KB, created by
Jonathan Druart
on 2020-03-03 13:26:46 UTC
(
hide
)
Description:
Bug 24754: Test intranet at the same time
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-03 13:26:46 UTC
Size:
3.34 KB
patch
obsolete
>From b97565ac3b9385968ca3421ec1ce879d851ac6cd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 3 Mar 2020 14:26:06 +0100 >Subject: [PATCH] Bug 24754: Test intranet at the same time > >--- > t/db_dependent/Circulation/issue.t | 48 +++++++++++++++++++++--------- > 1 file changed, 34 insertions(+), 14 deletions(-) > >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index c45e9a1e4b..25c1dff432 100644 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -245,9 +245,7 @@ my $stat = $dbh->selectrow_hashref("SELECT * FROM statistics WHERE type = 'renew > ok( $stat, "Bug 17781 - 'Improper branchcode set during renewal' still fixed" ); > > subtest 'Show that AddRenewal respects OpacRenewalBranch and interface' => sub { >- plan tests => 5; >- >- $se->mock( 'interface', sub { return 'opac' } ); >+ plan tests => 10; > > my $item_library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); >@@ -266,19 +264,41 @@ subtest 'Show that AddRenewal respects OpacRenewalBranch and interface' => sub { > > t::lib::Mocks::mock_preference( 'OpacRenewalBranch', $syspref ); > >- my $item = $builder->build_sample_item( >- { library => $item_library->branchcode, itype => $itemtype } ); >- my $opac_renew_issue = >- C4::Circulation::AddIssue( $patron->unblessed, $item->barcode ); >+ { >+ $se->mock( 'interface', sub { return 'opac' } ); >+ >+ my $item = $builder->build_sample_item( >+ { library => $item_library->branchcode, itype => $itemtype } ); >+ my $opac_renew_issue = >+ C4::Circulation::AddIssue( $patron->unblessed, $item->barcode ); >+ >+ AddRenewal( $patron->borrowernumber, $item->itemnumber, >+ "Stavromula", $datedue1, $daysago10 ); >+ >+ my $stat = Koha::Statistics->search( >+ { itemnumber => $item->itemnumber, type => 'renew' } )->next; >+ is( $stat->branch, $expected_branchcode, >+ "->renewal_branchcode is respected for OpacRenewalBranch = $syspref" >+ ); >+ } >+ >+ { >+ $se->mock( 'interface', sub { return 'intranet' } ); > >- AddRenewal( $patron->borrowernumber, $item->itemnumber, >- "Stavromula", $datedue1, $daysago10 ); >+ my $item = $builder->build_sample_item( >+ { library => $item_library->branchcode, itype => $itemtype } ); >+ my $opac_renew_issue = >+ C4::Circulation::AddIssue( $patron->unblessed, $item->barcode ); > >- my $stat = Koha::Statistics->search( >- { itemnumber => $item->itemnumber, type => 'renew' } )->next; >- is( $stat->branch, $expected_branchcode, >- "->renewal_branchcode is respected for OpacRenewalBranch = $syspref" >- ); >+ AddRenewal( $patron->borrowernumber, $item->itemnumber, >+ "Stavromula", $datedue1, $daysago10 ); >+ >+ my $stat = Koha::Statistics->search( >+ { itemnumber => $item->itemnumber, type => 'renew' } )->next; >+ is( $stat->branch, $logged_in_user->branchcode, >+ "->renewal_branchcode is always logged in branch for intranet" >+ ); >+ } > } > }; > >-- >2.20.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 24754
:
99768
|
99772
|
99773
|
99778
|
100000
|
100001
|
100006
|
100035
|
100269
|
100305
|
101094
|
101584
|
101585