($string, 'Str')} => undef,
'_freeze of untainted data -lives');
taint($string);
isnt(exception {Elive::Util::_freeze($string, 'Str')} => undef,
'_freeze of tainted data -lives
;
isa_ok($session, $class, 'session');
$session_data{name} = $session_name_tainted;
isnt( exception {$class->insert(\%session_data);} => undef,
'insert with tainted Str data - dies
, 'update with clean Str data - lives');
$update_data{userNotes} = $user_notes_tainted;
isnt( exception {$session->update(\%update_data)} => undef, 'update with tainted data - dies');
i
2345, name => 'as expected', password => ''}}]
)} => undef, 'readback ignores blank password');
isnt( exception {
$class->_readback_check(
{id => 12345, name => 'expected meeting name'},
[{id
ngId => 12345, name => 'whoops!'}}]
)} => undef, 'readback on invalid sub-record data - dies');
isnt( exception {
$class->_readback_check(
{id => 12345, name => 'as expected'},
[{id => 99999,
ngId => 12345, name => 'as expected'}}]
)} => undef, 'readback on invalid primary key - dies');
isnt( exception {
$class->_readback_check(
{id => 12345, name => 'as expected'},
[{id => 12345,
== 0, '_cmp Str ==');
isnt($class->_cmp_col('Str', 'aaa', 'AAA'), 0, '_cmp Str <>');
isnt($class->_cmp_col('Str', ' aaa bbb ', ' AAA BBB '), 0, '_cmp Str white space');
isnt($class->_cmp_col('St
r', ' aaa bbb ', 'AAA BBB'), 0, '_cmp Str white space lhs');
isnt($class->_cmp_col('Str', 'aaa bbb', ' AAA BBB '), 0, '_cmp Str white space rhs');
ok($class->_cmp_col('Str', 'aaa', 'AAA', case_insensi
ok($class->_cmp_col('enumRecordingStates', 'Off', 'off') == 0, '_cmp enum == (case insensitve)');
isnt($class->_cmp_col('enumRecordingStates', 'off', 'on'), 0, '_cmp enum !=');
ok($class->_cmp_col('E
=> 'bbill@test.org',
role => 3,);
} => undef,
"setter on live entity - lives"
);
isnt( sub{$admin_user->update} => undef, "update of admin user without -force - dies");
is( exception
;
isnt( exception {$admin_user->delete} => undef,"delete admin user without -force - dies");
is( exception {$admin_user->delete(force => 1)} => undef,"delete admin user with -force - lives");
isnt(
ion {$pleb_user->delete} => undef,"delete regular user - lives");
my $login_user = $connection->login;
isnt( exception {$login_user->delete} => undef,"delete login user - dies");
Elive->disconnect;
) = run_script($script_name, ['--invalid-opt'] );
my $status = last_script_exit_code();
isnt($status => 0, "$script_name invalid option: non-zero exit status");
is($stdout => '', "$sc
= run_script($script_name, [-c => 'blah blah'] );
my $status = last_script_exit_code();
isnt($status => 0, "$script_name invalid command: non-zero exit status");
like($stderr => qr{unrec
un_script($script_name, [-c => 'describe crud'] );
my $status = last_script_exit_code();
isnt($status => 0, "$script_name describe unknown: non-zero exit status");
like($stderr => qr{unk
');
is($preloads[3]->mimeType, 'application/octet-stream','expected mimeType for plan');
isnt( exception {$preloads[3]->update({name => 'test_plan.elpx updated'})} => undef, 'preload update -
er add - returns true');
# just to define what happens if we attempt to re-add a preload
isnt( exception {$check = $session->meeting->add_preload($preloads[2])} => undef,
're-add of pre
calar(@preloads)-2, 'meeting still has expected number of preloads');
$session->delete;
isnt( exception {$preloads[0]->retrieve($preload_id)} => undef, 'attempted retrieval of deleted preloa
($connection_2, 'Elive::Connection','connection')
or die "unable to get second connection";
isnt($connection->url, $connection_2->url, 'connections have distinct urls');
ok(my $user = $conne
ction_2->login, 'connection_2 login');
isa_ok($user_2, 'Elive::Entity::User','login_2');
isnt(Scalar::Util::refaddr($user), Scalar::Util::refaddr($user_2), 'users are distinct objects');
webservice.event');
is($C2_dup->url, $URL2_soap, 'connection 2 dup - has expected url');
isnt(Scalar::Util::refaddr($C2), Scalar::Util::refaddr($C2_dup),
'distinct connections on commo
oup_c2), Scalar::Util::refaddr($group_c2_from_cache),
'basic cacheing on connection 1');
isnt(Scalar::Util::refaddr($group_c1), Scalar::Util::refaddr($group_c2),
'distinct caches maintain
name => 'test group',
members => [$K2, $K3]
},
);
isnt($user_k1->url, $user_k2->url, 'distinct entities have distinct urls');
isnt($user_k1->url, $group_k1->url, 'urls distinct between entit
ts unified to cache");
ok($login->is_changed, 'login object still showing as changed');
isnt(
exception {$login_refetch = Elive::Entity::User->retrieve($login->userId, reuse => 0)} =>
ction');
is($user3->_refaddr, $user1->_refaddr, 'Objects with common primary key are unified');
isnt($user3->_refaddr, $user2->_refaddr, 'Objects with distinct primary are distinguished');
is($user
loginName => 'repeat',
firstName => 'Pete',
role => {roleId => 3},
},
copy => 1,
);
isnt(_ref($user1), _ref($user1_copy), 'copy is distinct from original');
ok(! $user1->_is_copy, '$
rasher)');
ok(!$meeting->is_moderator( $gate_crasher ), '!is_moderator($gate_crasher)');
isnt( exception {
$participant_list->participants->add($gate_crasher.'=3');
$participant_list->updat
->call('unknownCommandXXX')} => undef, 'call to unknown command - intially lives...');
}
isnt( exception {$connection->_check_for_errors($bad_som)} => undef, '...but dies when checked');
}
) {
$t->skip('skipping circular update test on mock connection')
for (1);
}
else {
isnt( exception {$group2->update} => undef, "attempt group update with circular reference - dies");
retrieval');
is( exception {$recording->delete} => undef, 'recording delete - lives');
isnt( exception {Elive::Entity::Recording->retrieve($recording_id)} => undef, "retrieval after delete
r ) = run_script($script_name, ['--invalid-opt'] );
my $status = last_script_exit_code();
isnt($status => 0, "$script_name invalid option: non-zero exit status");
is($stdout => '', "$s
ib '.';
use t::Elive::MockConnection;
Elive->connection( t::Elive::MockConnection->connect() );
isnt(
exception {
Elive::Entity::User->construct
({ loginName => 'user',
loginPassword =>
r ) = run_script($script_name, ['--invalid-opt']);
my $status = last_script_exit_code();
isnt($status => 0, "$script_name invalid option: non-zero exit status");
is($stdout => '', "$scr
rasher)');
ok(!$session->is_moderator( $gate_crasher ), '!is_moderator($gate_crasher)');
isnt( exception {
$session->participants->add($gate_crasher.'=3');
$session->update($gate_crasher.'=