Bugzilla – Attachment 33712 Details for
Bug 13277
t/SuggestionEngine_AuthorityFile.t shouldn't depend on the DB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13277: (QA followup) use t::lib::Mocks
Bug-13277-QA-followup-use-tlibMocks.patch (text/plain), 1.02 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-11-19 21:09:57 UTC
(
hide
)
Description:
Bug 13277: (QA followup) use t::lib::Mocks
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-11-19 21:09:57 UTC
Size:
1.02 KB
patch
obsolete
>From 86c5ee2892e01a5142f52524e2787297282ee46d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 19 Nov 2014 18:05:26 -0300 >Subject: [PATCH] Bug 13277: (QA followup) use t::lib::Mocks > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > t/SuggestionEngine_AuthorityFile.t | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > >diff --git a/t/SuggestionEngine_AuthorityFile.t b/t/SuggestionEngine_AuthorityFile.t >index 9ffe8f7..ef6eb42 100755 >--- a/t/SuggestionEngine_AuthorityFile.t >+++ b/t/SuggestionEngine_AuthorityFile.t >@@ -26,15 +26,10 @@ use MARC::Record; > > use Test::More; > use Test::MockModule; >-use DBD::Mock; >+use t::lib::Mocks; > > # Mock the DB connexion and C4::Context >-my $context = new Test::MockModule('C4::Context'); >-$context->mock( '_new_dbh', sub { >- my $dbh = DBI->connect( 'DBI:Mock:', '', '' ) >- || die "Cannot create handle: $DBI::errstr\n"; >- return $dbh; >-}); >+my $context = t::lib::Mocks::mock_dbh; > > use_ok('Koha::SuggestionEngine'); > >-- >1.9.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 13277
:
33634
|
33641
|
33698
| 33712