summaryrefslogtreecommitdiff
path: root/rt/t/customfields/ip.t
diff options
context:
space:
mode:
Diffstat (limited to 'rt/t/customfields/ip.t')
-rw-r--r--rt/t/customfields/ip.t11
1 files changed, 8 insertions, 3 deletions
diff --git a/rt/t/customfields/ip.t b/rt/t/customfields/ip.t
index f73e63fa5..3ab7fbd6a 100644
--- a/rt/t/customfields/ip.t
+++ b/rt/t/customfields/ip.t
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
use strict;
use warnings;
-use RT::Test tests => 73;
+use RT::Test tests => undef;
+use Test::Warn;
my ( $baseurl, $agent ) = RT::Test->started_ok;
ok( $agent->login, 'log in' );
@@ -265,7 +265,9 @@ diag "create a ticket with an IP of 10.0.0.1 and search for doesn't match '10.0.
ok( $id, "created first ticket $id" );
my $tickets = RT::Tickets->new($RT::SystemUser);
- $tickets->FromSQL("id=$id AND CF.{IP} NOT LIKE '10.0.0.'");
+ warning_like {
+ $tickets->FromSQL("id=$id AND CF.{IP} NOT LIKE '10.0.0.'");
+ } [qr/not a valid IPAddress/], "caught warning about valid IP address";
SKIP: {
skip "partical ip parse causes ambiguity", 1;
@@ -283,3 +285,6 @@ diag "test the operators in search page" if $ENV{'TEST_VERBOSE'};
ok( $op, "found 'CF.{IP}'Op" );
is_deeply( [ $op->possible_values ], [ '=', '!=', '<', '>' ], 'op values' );
}
+
+undef $agent;
+done_testing;