3 use RT::Interface::REST;
5 use RT::Test tests => undef;
7 my ( $baseurl, $m ) = RT::Test->started_ok;
9 my $cf = RT::Test->load_or_create_custom_field(
12 LookupType => 'RT::User',
14 $cf->AddToObject(RT::User->new(RT->SystemUser));
16 my $root = RT::User->new( RT->SystemUser );
18 $root->AddCustomFieldValue( Field => 'foo', Value => 'blabla' );
19 is( $root->FirstCustomFieldValue('foo'), 'blabla', 'cf is set' );
21 ok( $m->login, 'logged in' );
22 $m->post( "$baseurl/REST/1.0/show", [ id => 'user/12', ] );
23 like( $m->content, qr/CF-foo: blabla/, 'found the cf' );