#!perl
'new'
,
'to_form'
,
'from_form'
,
'rt_type'
,
'id'
,
'creator_id'
,
'subject'
,
'created'
,
'message_id'
,
'parent_id'
,
'content_type'
,
'file_name'
,
'transaction_id'
,
'content'
,
'headers'
,
'parent'
,
'content_encoding'
,
);
BEGIN {
use_ok(
'RT::Client::REST::Attachment'
);
}
for
my
$method
(METHODS) {
can_ok(
'RT::Client::REST::Attachment'
,
$method
);
}
my
$ticket
;
lives_ok {
$ticket
= RT::Client::REST::Attachment->new;
}
'Ticket can get successfully created'
;
for
my
$method
(
qw(store search count)
) {
throws_ok {
$ticket
->
$method
;
}
'RT::Client::REST::Exception'
;
throws_ok {
$ticket
->
$method
;
}
'RT::Client::REST::Object::IllegalMethodException'
,
"method '$method' should throw an exception"
;
}
ok(
'attachment'
eq
$ticket
->rt_type );