File: 21-user.t

package info (click to toggle)
librt-client-rest-perl 1%3A0.56-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 568 kB
  • sloc: perl: 4,205; makefile: 9
file content (38 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (3)
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
#!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;