From 5c96d46d56f2066bb40d9a34c4db56f53f43c6f2 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 31 Dec 2009 14:00:35 +0000 Subject: merging 3.8.7!!! --- rt/lib/t/regression/23-batch-upload-csv.t | 47 ------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 rt/lib/t/regression/23-batch-upload-csv.t (limited to 'rt/lib/t/regression/23-batch-upload-csv.t') diff --git a/rt/lib/t/regression/23-batch-upload-csv.t b/rt/lib/t/regression/23-batch-upload-csv.t deleted file mode 100644 index fc9436a20..000000000 --- a/rt/lib/t/regression/23-batch-upload-csv.t +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/perl -w -use strict; use warnings; - -use Test::More qw/no_plan/; -use_ok('RT'); -RT::LoadConfig(); -RT::Init(); -use_ok('RT::Action::CreateTickets'); - -my $QUEUE = 'uploadtest-'.$$; - -my $queue_obj = RT::Queue->new($RT::SystemUser); -$queue_obj->Create(Name => $QUEUE); - -my $cf = RT::CustomField->new($RT::SystemUser); -my ($val,$msg) = $cf->Create(Name => 'Work Package-'.$$, Type => 'Freeform', LookupType => RT::Ticket->CustomFieldLookupType, MaxValues => 1); -ok($cf->id); -ok($val,$msg); -($val, $msg) = $cf->AddToObject($queue_obj); -ok($val,$msg); -ok($queue_obj->TicketCustomFields()->Count, "We have a custom field, at least"); - - -my $data = <Name]} -create-1,$QUEUE,hi,new,root,2.0 -create-2,$QUEUE,hello,new,root,3.0 -EOF - -my $action = RT::Action::CreateTickets->new(CurrentUser => RT::CurrentUser->new('root')); -ok ($action->CurrentUser->id , "WE have a current user"); - -$action->Parse(Content => $data); -my @results = $action->CreateByTemplate(); - -my $tix = RT::Tickets->new($RT::SystemUser); -$tix->FromSQL ("Queue = '". $QUEUE."'"); -$tix->OrderBy( FIELD => 'id', ORDER => 'ASC' ); -ok($tix->Count); -my $first = $tix->First(); -is($first->Subject(), 'hi'); -is($first->FirstCustomFieldValue($cf->id), '2.0'); - -my $second = $tix->Next; -is($second->Subject(), 'hello'); -is($second->FirstCustomFieldValue($cf->id), '3.0'); -1; -- cgit v1.2.1