From 038ee9183da904484c9bf82f6868728fb6ac59d4 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 6 Feb 2014 17:09:50 +0100 Subject: [PATCH] [SIGNED OFF] Bug 11701: Unit tests for C4::Context::Zconn TEST PLAN --------- 1) apply patch 2) run koha qa test tool 3) prove -v t/Context.t Unit tests ran as expected. Signed-off-by: Mark Tompsett --- t/Context.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/Context.t b/t/Context.t index 6775b8e..9bad321 100755 --- a/t/Context.t +++ b/t/Context.t @@ -2,7 +2,7 @@ use Modern::Perl; use DBI; -use Test::More tests => 14; +use Test::More tests => 16; use Test::MockModule; BEGIN { @@ -45,3 +45,8 @@ is(C4::Context::db_scheme2dbi('mysql'), 'mysql', 'ask for mysql, get mysql'); is(C4::Context::db_scheme2dbi('Pg'), 'Pg', 'ask for Pg, get Pg'); is(C4::Context::db_scheme2dbi('xxx'), 'mysql', 'ask for unsupported DBMS, get mysql'); is(C4::Context::db_scheme2dbi(), 'mysql', 'ask for nothing, get mysql'); + +my $oConnection = C4::Context->Zconn('biblioserver', 0); +isnt($oConnection->option('async'), 1, "ZOOM connection is synchronous"); +$oConnection = C4::Context->Zconn('biblioserver', 1); +is($oConnection->option('async'), 1, "ZOOM connection is asynchronous"); -- 1.7.9.5