X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fcustomfields%2Fip.t;h=37afcb71dcd087f9ff87459ffe0367f7dc8ebd93;hb=008524b8e963831999983769f7fec11f55a72f16;hp=f73e63fa569c03f066b414237b611b74defb8b0c;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/rt/t/customfields/ip.t b/rt/t/customfields/ip.t index f73e63fa5..37afcb71d 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' ); @@ -147,7 +147,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'}; } ); - $agent->content_contains( 'can not be parsed as an IP address', + $agent->content_contains( 'is not a valid IP address', 'ticket fails to create' ); } @@ -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;