Changeset 14 for LATMOS-Accounts


Ignore:
Timestamp:
03/03/09 01:30:24 (15 years ago)
Author:
nanardon
Message:
  • test get/set fields
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/t/11_bases_unix.t

    r13 r14  
    11use strict; 
    22use warnings; 
    3 use Test::More tests => 14; 
     3use Test::More tests => 20; 
    44use File::Temp; 
    55 
     
    3232ok(my $group = $unixb->get_object('group', 'root'), "Can get root group"); 
    3333 
    34 is($user->get_c_field('homeDirectory'), '/root', 'Can get home directory'); 
     34is($user->get_c_field('homeDirectory'), '/root', 'Can get homeDirectory directory'); 
     35is($user->get_field('home'), '/root', 'Can get home directory'); 
     36 
     37is($user->get_field('shell'), '/bin/bash', 'Can get login shell'); 
     38ok($user->set_fields(shell => '/bin/tcsh'), "Can set login shell"); 
     39is($user->get_field('shell'), '/bin/tcsh', 'Can get modified login shell'); 
    3540 
    3641ok($unixb->commit, "Can save unix base"); 
    3742 
     43 
     44ok(my $unixbmod = LATMOS::Accounts::Bases->new( 
     45    'unix', 
     46    passwd  => "$dir/passwd", 
     47    shadow  => "$dir/shadow", 
     48    group   => "$dir/group", 
     49    gshadow => "$dir/gshadow", 
     50    ), "Can get unix base"); 
     51is($user->get_field('shell'), '/bin/tcsh', 'Can get modified login shell'); 
     52 
     53 
    3854system('rm', '-fr', $dir); 
Note: See TracChangeset for help on using the changeset viewer.