File: 21-user.t

package info (click to toggle)
librt-client-rest-perl 1%3A0.72-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 588 kB
  • sloc: perl: 4,883; makefile: 9
file content (39 lines) | stat: -rw-r--r-- 796 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!perl
# vim:ft=perl:
use strict;
use warnings;

use Test::More;
use Test::Exception;

use constant METHODS => (
    'new',     'to_form', 'from_form',
    'rt_type', 'id',

    # attributes:
    'name',        'password',      'real_name',   'gecos',
    'privileged',  'email_address', 'comments',    'organization',
    'address_one', 'address_two',   'city',        'state', 'zip', 'country',
    'home_phone',  'work_phone',    'cell_phone',  'pager', 'disabled',
    'nickname',    'lang',          'contactinfo', 'signature'
);

BEGIN {
    use_ok('RT::Client::REST::User');
}

my $user;

lives_ok {
    $user = RT::Client::REST::User->new;
}
'User can get successfully created';

for my $method (METHODS) {
    can_ok( $user, $method );
}

ok( 'user' eq $user->rt_type );

done_testing;