get and update tests
This commit is contained in:
parent
5845a4b549
commit
771b4aeb1e
1 changed files with 21 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ my $session = WebGUI::Test->session;
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
my $tests = 17;
|
||||
my $tests = 23;
|
||||
plan tests => 1 + $tests;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -134,6 +134,26 @@ my $dateCreated = WebGUI::DateTime->new($session, $fence->get('dateCreated'));
|
|||
my $deltaDC = $dateCreated - $now;
|
||||
cmp_ok( $deltaDC->seconds, '<=', 2, 'dateCreated is set properly');
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# get, update
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
ok($session->id->valid($fence->get('vendorId')), 'get: vendorId is a valid guid');
|
||||
is($fence->getId, $fence->get('vendorId'), 'get: getId is an alias for get vendorId');
|
||||
is($fence->get('userId'), $fenceUser->userId, 'get: userId');
|
||||
is($fence->get('name'), undef, 'get: by default, no name is set');
|
||||
|
||||
$fence->update({name => 'Bogs Diamond'});
|
||||
is($fence->get('name'), 'Bogs Diamond', 'get: get name');
|
||||
is($fence->get('userId'), $fenceUser->userId, 'get: updating name did not affect userId');
|
||||
|
||||
my $newProps = {
|
||||
name => 'Warden Norton',
|
||||
url => 'http://www.shawshank.com',
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue