From 85fcacd69e77c658d92646bc4516499b4327c8a3 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 6 Feb 2014 17:09:50 +0100 Subject: [PATCH] Bug 11701: Unit tests for C4::Context::Zconn --- 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.10.4