From: Galen Charlton Date: Thu, 3 Mar 2016 02:07:09 +0000 (-0500) Subject: LP#1533329: bail out of live Perl test if opt-in not enabled X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2180dacd9611eb854ddbbcfe660e1b862529d58c;p=evergreen%2Ftadl.git LP#1533329: bail out of live Perl test if opt-in not enabled Signed-off-by: Galen Charlton --- 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. #----------------------------------------------------------------