Bugzilla – Attachment 51914 Details for
Bug 16582
t/Price.t test should pass if Test::DBIx::Class is not available
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16582 t/Price.t test should pass if Test::DBIx::Class is not available
Bug-16582-tPricet-test-should-pass-if-TestDBIxClas.patch (text/plain), 1.28 KB, created by
Mark Tompsett
on 2016-05-30 10:15:21 UTC
(
hide
)
Description:
Bug 16582 t/Price.t test should pass if Test::DBIx::Class is not available
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-05-30 10:15:21 UTC
Size:
1.28 KB
patch
obsolete
>From 7ad7b0ce7d0deca4718c4660ed51b358fad7d537 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 24 May 2016 22:31:15 -0400 >Subject: [PATCH] Bug 16582 t/Price.t test should pass if Test::DBIx::Class is > not available > >TEST PLAN >--------- >1) prove t/Prices.t > -- failure >2) apply patch >3) prove t/Prices.t > -- nicely skipped when Test::DBIx::Class is not available. > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >--- > t/Prices.t | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > >diff --git a/t/Prices.t b/t/Prices.t >index d6bfda2..74d2eac 100644 >--- a/t/Prices.t >+++ b/t/Prices.t >@@ -1,15 +1,23 @@ > use Modern::Perl; >-use Test::More tests => 17; >+use Test::More; > use Test::MockModule; > > use t::lib::Mocks; > >+use Module::Load::Conditional qw/check_install/; >+ > BEGIN { >- use_ok('C4::Acquisition'); >- use_ok('C4::Bookseller'); >- use_ok('C4::Context'); >- use_ok('Koha::Number::Price'); >-}; >+ if ( check_install( module => 'Test::DBIx::Class' ) ) { >+ plan tests => 17; >+ } else { >+ plan skip_all => "Need Test::DBIx::Class" >+ } >+} >+ >+use_ok('C4::Acquisition'); >+use_ok('C4::Bookseller'); >+use_ok('C4::Context'); >+use_ok('Koha::Number::Price'); > > t::lib::Mocks::mock_preference( 'gist', '0.02|0.05|0.196' ); > >-- >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 16582
:
51758
|
51759
|
51909
|
51910
|
51913
|
51914
|
51941