-#!/usr/bin/perl
use strict;
use warnings;
-use RT::Test tests => 102;
+use RT::Test tests => undef;
+use Test::Warn;
my ( $baseurl, $agent ) = RT::Test->started_ok;
ok( $agent->login, 'log in' );
diag "load and check basic properties of the IP CF" if $ENV{'TEST_VERBOSE'};
{
my $cfs = RT::CustomFields->new($RT::SystemUser);
- $cfs->Limit( FIELD => 'Name', VALUE => 'IP' );
+ $cfs->Limit( FIELD => 'Name', VALUE => 'IP', CASESENSITIVE => 0 );
is( $cfs->Count, 1, "found one CF with name 'IP'" );
$cf = $cfs->First;
}
);
- $agent->content_contains( 'can not be parsed as an IP address',
+ $agent->content_contains( 'is not a valid IP address',
'ticket fails to create' );
}
}
ok( $id, "created first ticket $id" );
my $tickets = RT::Tickets->new($RT::SystemUser);
- $tickets->FromSQL("id=$id AND CF.{IP} NOT LIKE 'abcd:23'");
+ warning_like {
+ $tickets->FromSQL("id=$id AND CF.{IP} NOT LIKE 'abcd:23'");
+ } [qr/not a valid IPAddress/], "caught warning about IPAddress";
- SKIP: {
- skip "partical ip parse can causes ambiguity", 1;
+ TODO: {
+ local $TODO = "partial ip parse can causes ambiguity";
is( $tickets->Count, 0, "should not have found the ticket" );
}
}
+undef $agent;
+done_testing;