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