X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fcustomfields%2Fexternal.t;h=4b84144ee88b16070d3ebf1f692645a782c261eb;hb=cb28905b4bc28f3d7a1a67d14cf9c8b44fafe2d5;hp=0abf6eca111e9cba86d243bef8a83b4bda776fbd;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/t/customfields/external.t b/rt/t/customfields/external.t index 0abf6eca1..4b84144ee 100644 --- a/rt/t/customfields/external.t +++ b/rt/t/customfields/external.t @@ -1,10 +1,9 @@ -#!/usr/bin/perl use warnings; use strict; use RT; -use RT::Test nodata => 1, tests => 11; +use RT::Test nodata => 1, tests => undef; sub new (*) { my $class = shift; @@ -52,5 +51,17 @@ isa_ok( $cf, 'RT::CustomField' ); } ok( !$failure, "all values have name" ); is( $values->Count, $count, "count is correct" ); + is( $values->CustomFieldObject->id, $cf->id, "Values stored the CF id" ); + is( $values->CustomFieldObject, $cf, "Values stored the identical CF object" ); + is( $values->First->CustomFieldObj->id, $cf->id, "A value stored the CF id" ); + is( $values->First->CustomFieldObj, $cf, "A value stored the identical CF object" ); } +{ + my ($ret, $msg) = $cf->SetValuesClass('RT::CustomFieldValues'); + ok $ret, 'Reverting this CF as internal source values based' or diag "error: $msg"; + ($ret, $msg) = $cf->SetValuesClass('RT::CustomFieldValues::Groups'); + ok $ret, 'Reverting this CF as external source values based' or diag "error: $msg"; +} + +done_testing;