[Rt-commit] rt branch, ip-customfields, updated. rt-3.8.8-674-gc154fbf
? sunnavy
sunnavy at bestpractical.com
Thu Sep 16 01:18:21 EDT 2010
The branch, ip-customfields has been updated
via c154fbf7fbcc1f5acec433cf8c503a7198a566ea (commit)
from 30fc9e4c71a19f158ab96e4c448e4783a402a224 (commit)
Summary of changes:
t/customfields/ip.t | 13 ++++++-------
t/customfields/ipv6.t | 13 ++++++-------
2 files changed, 12 insertions(+), 14 deletions(-)
- Log -----------------------------------------------------------------
commit c154fbf7fbcc1f5acec433cf8c503a7198a566ea
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Sep 16 08:12:00 2010 +0800
small tweak
diff --git a/t/customfields/ip.t b/t/customfields/ip.t
index c96db8f..b13cd41 100644
--- a/t/customfields/ip.t
+++ b/t/customfields/ip.t
@@ -56,7 +56,7 @@ diag "create a ticket via web and set IP" if $ENV{'TEST_VERBOSE'};
}
);
- $agent->content_like( qr/\Q$val/, "IP on the page" );
+ $agent->content_contains( $val, "IP on the page" );
my ($id) = $agent->content =~ /Ticket (\d+) created/;
ok( $id, "created ticket $id" );
@@ -84,11 +84,11 @@ diag "create a ticket and edit IP field using Edit page"
"Followed 'Basics' link" );
$agent->form_number(3);
- like( $agent->value($cf_field), qr/^\s*$/, 'IP is empty' );
+ is( $agent->value($cf_field), '', 'IP is empty' );
$agent->field( $cf_field => $val );
$agent->click('SubmitTicket');
- $agent->content_like( qr/\Q$val/, "IP on the page" );
+ $agent->content_contains( $val, "IP on the page" );
my $ticket = RT::Ticket->new($RT::SystemUser);
$ticket->Load($id);
@@ -100,12 +100,11 @@ diag "create a ticket and edit IP field using Edit page"
$agent->follow_link_ok( { text => 'Basics', n => "1" },
"Followed 'Basics' link" );
$agent->form_number(3);
- like( $agent->value($cf_field),
- qr/^\s*\Q172.16.0.1\E\s*$/, 'IP is in input box' );
+ is( $agent->value($cf_field), '172.16.0.1', 'IP is in input box' );
$agent->field( $cf_field => $val );
$agent->click('SubmitTicket');
- $agent->content_like( qr/\Q172.16.0.2/, "IP on the page" );
+ $agent->content_contains( '172.16.0.2', "IP on the page" );
$ticket = RT::Ticket->new($RT::SystemUser);
$ticket->Load($id);
@@ -148,7 +147,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
}
);
- $agent->content_like( qr/can not be parsed to IPAddress/,
+ $agent->content_contains( 'can not be parsed to IPAddress',
'ticket fails to create' );
}
diff --git a/t/customfields/ipv6.t b/t/customfields/ipv6.t
index e64dd28..ca3d242 100644
--- a/t/customfields/ipv6.t
+++ b/t/customfields/ipv6.t
@@ -66,7 +66,7 @@ diag "create a ticket via web and set IP" if $ENV{'TEST_VERBOSE'};
}
);
- $agent->content_like( qr/$valid{$ip}/, "IP on the page" );
+ $agent->content_contains( $valid{$ip}, "IP on the page" );
my ($id) = $agent->content =~ /Ticket (\d+) created/;
ok( $id, "created ticket $id" );
@@ -97,11 +97,11 @@ diag "create a ticket and edit IP field using Edit page"
"Followed 'Basics' link" );
$agent->form_number(3);
- like( $agent->value($cf_field), qr/^\s*$/, 'IP is empty' );
+ is( $agent->value($cf_field), '', 'IP is empty' );
$agent->field( $cf_field => $valid{$ip} );
$agent->click('SubmitTicket');
- $agent->content_like( qr/$valid{$ip}/, "IP on the page" );
+ $agent->content_contains( $valid{$ip}, "IP on the page" );
my $ticket = RT::Ticket->new($RT::SystemUser);
$ticket->Load($id);
@@ -117,12 +117,11 @@ diag "create a ticket and edit IP field using Edit page"
$agent->follow_link_ok( { text => 'Basics', n => "1" },
"Followed 'Basics' link" );
$agent->form_number(3);
- like( $agent->value($cf_field),
- qr/^$valid{$ip}$/, 'IP is in input box' );
+ is( $agent->value($cf_field), $valid{$ip}, 'IP is in input box' );
$agent->field( $cf_field => $new_ip );
$agent->click('SubmitTicket');
- $agent->content_like( qr/$new_value/, "IP on the page" );
+ $agent->content_contains( $new_value, "IP on the page" );
$ticket = RT::Ticket->new($RT::SystemUser);
$ticket->Load($id);
@@ -147,7 +146,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
}
);
- $agent->content_like( qr/can not be parsed to IPAddress/,
+ $agent->content_contains( 'can not be parsed to IPAddress',
'ticket fails to create' );
}
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list