diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2013-07-02 21:11:29 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2013-07-02 21:11:29 -0700 |
| commit | 3d0a1bb06b895c5be6e3f0517d355442a6b1e125 (patch) | |
| tree | 84069ebc3254825b952a482e11cdbbbc69f6fe85 /rt/t/articles/class.t | |
| parent | f3b99c11d6eed33f467dda360180a698a85c54e8 (diff) | |
| parent | d62206a94d9d49ef96640e0a8ec492679f8345e9 (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.t | 17 |
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(); |
