From 2180dacd9611eb854ddbbcfe660e1b862529d58c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 2 Mar 2016 21:07:09 -0500 Subject: [PATCH 1/1] LP#1533329: bail out of live Perl test if opt-in not enabled Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/live_t/12-lp1533329-opt-in.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Open-ILS/src/perlmods/live_t/12-lp1533329-opt-in.t b/Open-ILS/src/perlmods/live_t/12-lp1533329-opt-in.t index cdf9019656..31b69ab246 100644 --- a/Open-ILS/src/perlmods/live_t/12-lp1533329-opt-in.t +++ b/Open-ILS/src/perlmods/live_t/12-lp1533329-opt-in.t @@ -35,6 +35,14 @@ sub new_org_setting { return $set; } +sub opt_in_enabled { + my $resp = $U->simplereq( + 'open-ils.actor', + 'open-ils.actor.user.org_unit_opt_in.enabled' + ); + return $resp; +} + # do an opt-in check sub opt_in_check { my ($authtoken, $usr_id) = @_; @@ -45,6 +53,10 @@ sub opt_in_check { return $resp; } +unless(opt_in_enabled()) { + BAIL_OUT('cannot test opt-in unless enabled in opensrf.xml'); +} + #---------------------------------------------------------------- # 1. Login, register workstation, get authtoken. #---------------------------------------------------------------- -- 2.43.2