summaryrefslogtreecommitdiff
path: root/rt/t/api/template-insert.t
blob: 1bf5fc390ba2fe879b7a979f1377e4f2c85f64ff (plain)
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
#!/usr/bin/perl

use warnings;
use strict;


use RT;
use RT::Test tests => 7;



# This tiny little test script triggers an interaction bug between DBD::Oracle 1.16, SB 1.15 and RT 3.4

use_ok('RT::Template');
my $template = RT::Template->new(RT->SystemUser);

isa_ok($template, 'RT::Template');
my ($val,$msg) = $template->Create(Queue => 1,
                  Name => 'InsertTest',
                  Content => 'This is template content');
ok($val,$msg);
is($template->Name, 'InsertTest');
is($template->Content, 'This is template content', "We created the object right");
($val, $msg) = $template->SetContent( 'This is new template content');
ok($val,$msg);
is($template->Content, 'This is new template content', "We managed to _Set_ the content");