]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/perlmods/live_t/07-anon_pcrud.t
LP#1670407 Add tests for xact_finish close/re-open
[working/Evergreen.git] / Open-ILS / src / perlmods / live_t / 07-anon_pcrud.t
1 #!perl
2
3 use Test::More tests => 5;
4
5 diag("Tests Anonymous PCRUD personality for CStoreEditor");
6
7 use strict; use warnings;
8
9 use OpenILS::Utils::TestUtils;
10 use OpenILS::Utils::CStoreEditor (':funcs', personality => 'open-ils.pcrud');
11 my $script = OpenILS::Utils::TestUtils->new();
12 $script->bootstrap;
13
14 my $e = new_editor;
15 $e->init;
16
17 is ($e->personality, 'open-ils.pcrud', 'Confirm personality');
18
19 my $org = $e->retrieve_actor_org_unit(1);
20 is($org->id, 1, 'Anon org unit retrieved');
21
22 my $user = $e->retrieve_actor_user(1);
23 is($user,  undef, 'Anon user not retrieved');
24
25 $org = $e->search_actor_org_unit({id => 1})->[0];
26 is($org->id, 1, 'Anon org unit searched');
27
28 $user = $e->search_actor_user({id => 1})->[0];
29 is($user,  undef, 'Anon user not searched');
30
31