[Rt-commit] rt branch, admin_ui, updated. 6e00ab142194687f66acc881738506027f72b173
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Jan 19 20:54:13 EST 2010
The branch, admin_ui has been updated
via 6e00ab142194687f66acc881738506027f72b173 (commit)
from 7a2a64c58565feefc32dc52f2b39d908a9bb3f50 (commit)
Summary of changes:
t/web/admin/custom_fields.t | 5 ++++-
t/web/admin/global_templates.t | 3 ++-
t/web/admin/queues.t | 22 ++++++++++++++++++++--
3 files changed, 26 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 6e00ab142194687f66acc881738506027f72b173
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jan 20 09:54:04 2010 +0800
more tests
diff --git a/t/web/admin/custom_fields.t b/t/web/admin/custom_fields.t
index 3fa720f..d740f55 100644
--- a/t/web/admin/custom_fields.t
+++ b/t/web/admin/custom_fields.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
-use RT::Test strict => 0, tests => 50, l10n => 1;
+use RT::Test strict => 0, tests => 51, l10n => 1;
my ( $baseurl, $agent ) = RT::Test->started_ok;
ok( $agent->login, 'logged in' );
@@ -129,6 +129,7 @@ $agent->fill_in_action_ok(
);
$agent->submit;
$agent->content_contains( 'Created', 'created cfv_foo' );
+$agent->content_contains( 'Delete', 'we got Delete button' );
my $cfv = RT::Model::CustomFieldValue->new( current_user => RT->system_user );
ok( $cfv->load_by_cols( name => 'cfv_foo' ), 'load cfv_foo' );
is( $cfv->name, 'cfv_foo', 'did created cfv_foo' );
@@ -147,3 +148,5 @@ $agent->follow_link_ok( { text => 'Values' }, 'Values' );
ok( $cfv->load_by_cols( description => 'foo description' ),
'load cfv by description' );
is( $cfv->description, 'foo description', 'did update description of cfv_foo' );
+
+
diff --git a/t/web/admin/global_templates.t b/t/web/admin/global_templates.t
index 8cb6f00..603529f 100644
--- a/t/web/admin/global_templates.t
+++ b/t/web/admin/global_templates.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
-use RT::Test strict => 0, tests => 14, l10n => 1;
+use RT::Test strict => 0, tests => 15, l10n => 1;
my ( $baseurl, $agent ) = RT::Test->started_ok;
ok( $agent->login, 'logged in' );
@@ -18,6 +18,7 @@ $agent->fill_in_action_ok(
);
$agent->submit;
$agent->content_contains( 'Created', 'created template_foo' );
+$agent->content_contains( 'Delete', 'we got Delete button' );
my $template_foo = RT::Model::Template->new( current_user => RT->system_user );
ok( $template_foo->load('template_foo'), 'load template_foo' );
is( $template_foo->name, 'template_foo', 'did create template_foo' );
diff --git a/t/web/admin/queues.t b/t/web/admin/queues.t
index 4b92b19..88ab62c 100644
--- a/t/web/admin/queues.t
+++ b/t/web/admin/queues.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
-use RT::Test strict => 0, tests => 45, l10n => 1;
+use RT::Test strict => 0, tests => 51, l10n => 1;
my ( $baseurl, $agent ) = RT::Test->started_ok;
ok( $agent->login, 'logged in' );
@@ -149,7 +149,25 @@ $agent->follow_link_ok(
'follow Transaction Custom Fields link'
);
$agent->follow_link_ok( { text => 'GnuPG' }, 'follow GnuPG link' );
-$agent->follow_link_ok( { text => 'Templates' }, 'follow Templates link' );
+$agent->follow_link_ok(
+ {
+ text => 'Templates',
+ url_regex => qr{/admin/queues/templates},
+ },
+ 'follow Templates link'
+);
+my $moniker = $agent->moniker_for('RT::Action::CreateTemplate');
+$agent->fill_in_action_ok(
+ $moniker,
+ 'name' => 'template_foo',
+);
+$agent->submit;
+$agent->content_contains( 'Created', 'created template_foo' );
+$agent->content_contains( 'Delete', 'we got Delete button' );
+my $template_foo = RT::Model::Template->new( current_user => RT->system_user );
+ok( $template_foo->load('template_foo'), 'load template_foo' );
+is( $template_foo->name, 'template_foo', 'did create template_foo' );
+is( $template_foo->queue->id, $queue->id, 'queue of template_foo' );
# let's create a queue
$agent->get_ok('/admin/queues/');
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list