From b60eb9a69c5ce10034f0d266834258af47867c44 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 1 Aug 2014 13:58:33 -0400 Subject: [PATCH] CStoreEditor anon/pcrud personality live test Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/live_t/07-anon_pcrud.t | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Open-ILS/src/perlmods/live_t/07-anon_pcrud.t diff --git a/Open-ILS/src/perlmods/live_t/07-anon_pcrud.t b/Open-ILS/src/perlmods/live_t/07-anon_pcrud.t new file mode 100644 index 0000000000..9fddac7c55 --- /dev/null +++ b/Open-ILS/src/perlmods/live_t/07-anon_pcrud.t @@ -0,0 +1,31 @@ +#!perl + +use Test::More tests => 5; + +diag("Tests Anonymous PCRUD personality for CStoreEditor"); + +use strict; use warnings; + +use OpenILS::Utils::TestUtils; +use OpenILS::Utils::CStoreEditor (':funcs', personality => 'open-ils.pcrud'); +my $script = OpenILS::Utils::TestUtils->new(); +$script->bootstrap; + +my $e = new_editor; +$e->init; + +is ($e->personality, 'open-ils.pcrud', 'Confirm personality'); + +my $org = $e->retrieve_actor_org_unit(1); +is($org->id, 1, 'Anon org unit retrieved'); + +my $user = $e->retrieve_actor_user(1); +is($user, undef, 'Anon user not retrieved'); + +$org = $e->search_actor_org_unit({id => 1})->[0]; +is($org->id, 1, 'Anon org unit searched'); + +$user = $e->search_actor_user({id => 1})->[0]; +is($user, undef, 'Anon user not searched'); + + -- 2.11.0