summaryrefslogtreecommitdiff
path: root/rt/t/articles/class.t
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-07-02 21:11:29 -0700
committerIvan Kohler <ivan@freeside.biz>2013-07-02 21:11:29 -0700
commit3d0a1bb06b895c5be6e3f0517d355442a6b1e125 (patch)
tree84069ebc3254825b952a482e11cdbbbc69f6fe85 /rt/t/articles/class.t
parentf3b99c11d6eed33f467dda360180a698a85c54e8 (diff)
parentd62206a94d9d49ef96640e0a8ec492679f8345e9 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'rt/t/articles/class.t')
-rw-r--r--rt/t/articles/class.t17
1 files changed, 13 insertions, 4 deletions
diff --git a/rt/t/articles/class.t b/rt/t/articles/class.t
index 84d6e23be..7a7c015fc 100644
--- a/rt/t/articles/class.t
+++ b/rt/t/articles/class.t
@@ -1,9 +1,8 @@
-#!/usr/bin/perl
use strict;
use warnings;
-use RT::Test tests => 24;
+use RT::Test tests => undef;
use_ok 'RT::Articles';
use_ok 'RT::Classes';
@@ -18,14 +17,21 @@ my ($id, $msg) = $cl->Create(Name => 'Test-'.$$, Description => 'A test class');
ok ($id, $msg);
+ok( $cl->SetName( 'test-' . $$ ), 'rename to lower cased version' );
+ok( $cl->SetName( 'Test-' . $$ ), 'rename back' );
+
# no duplicate class names should be allowed
-($id, $msg) = $cl->Create(Name => 'Test-'.$$, Description => 'A test class');
+($id, $msg) = RT::Class->new($root)->Create(Name => 'Test-'.$$, Description => 'A test class');
+
+ok (!$id, $msg);
+
+($id, $msg) = RT::Class->new($root)->Create(Name => 'test-'.$$, Description => 'A test class');
ok (!$id, $msg);
#class name should be required
-($id, $msg) = $cl->Create(Name => '', Description => 'A test class');
+($id, $msg) = RT::Class->new($root)->Create(Name => '', Description => 'A test class');
ok (!$id, $msg);
@@ -74,3 +80,6 @@ $m->submit();
$m->content_like(qr/Description changed from.*no value.*to .*Test Description/,'description changed');
$m->form_number(3);
is($m->current_form->find_input('Include-Name')->value,undef,'Disabled Including Names for this Class');
+
+undef $m;
+done_testing();