import rt 3.8.7
[freeside.git] / rt / t / api / template-insert.t
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6
7 use RT;
8 use RT::Test tests => 7;
9
10
11
12 # This tiny little test script triggers an interaction bug between DBD::Oracle 1.16, SB 1.15 and RT 3.4
13
14 use_ok('RT::Template');
15 my $template = RT::Template->new($RT::SystemUser);
16
17 isa_ok($template, 'RT::Template');
18 my ($val,$msg) = $template->Create(Queue => 1,
19                   Name => 'InsertTest',
20                   Content => 'This is template content');
21 ok($val,$msg);
22 is($template->Name, 'InsertTest');
23 is($template->Content, 'This is template content', "We created the object right");
24 ($val, $msg) = $template->SetContent( 'This is new template content');
25 ok($val,$msg);
26 is($template->Content, 'This is new template content', "We managed to _Set_ the content");