~ubuntu-branches/debian/experimental/otrs2/experimental

« back to all changes in this revision

Viewing changes to scripts/test/GenericInterface/Operation/Ticket/TicketCreate.t

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2012-08-22 18:00:51 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20120822180051-by6plokxiowzgt08
Tags: 3.1.9+dfsg1-1
* New upstream release.
* Fix typo in the changelog of my 3.1.7+dfsg1-3 upload.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# TicketCreate.t - GenericInterface TicketCreate tests for TicketConnector backend
3
3
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
4
4
# --
5
 
# $Id: TicketCreate.t,v 1.10 2012/02/13 22:27:38 cr Exp $
 
5
# $Id: TicketCreate.t,v 1.10.2.1 2012/08/16 14:17:45 cr Exp $
6
6
# --
7
7
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
8
8
# the enclosed file COPYING for license information (AGPL). If you
34
34
use Kernel::System::State;
35
35
use Kernel::System::DynamicField;
36
36
use Kernel::System::User;
 
37
use Kernel::System::Valid;
37
38
 
38
39
# set UserID to root because in public interface there is no user
39
40
$Self->{UserID} = 1;
141
142
    ConfigObject => $ConfigObject,
142
143
);
143
144
 
 
145
my $ValidObject = Kernel::System::Valid->new(
 
146
    %{$Self},
 
147
    ConfigObject => $ConfigObject,
 
148
);
 
149
 
144
150
my $TestOwnerLogin        = $HelperObject->TestUserCreate();
145
151
my $TestResponsibleLogin  = $HelperObject->TestUserCreate();
146
152
my $TestCustomerUserLogin = $HelperObject->TestCustomerUserCreate();
151
157
    UserLogin => $TestResponsibleLogin,
152
158
);
153
159
 
 
160
my $InvalidID = $ValidObject->ValidLookup( Valid => 'invalid' );
 
161
 
 
162
# sanity test
 
163
$Self->IsNot(
 
164
    $InvalidID,
 
165
    undef,
 
166
    "ValidLookup() for 'invalid' should not be undef"
 
167
);
 
168
 
154
169
# create new queue
155
170
my $QueueID = $QueueObject->QueueAdd(
156
171
    Name            => 'TestQueue' . $RandomID,
3541
3556
{
3542
3557
    my $Success = $QueueObject->QueueUpdate(
3543
3558
        %QueueData,
3544
 
        ValidID => 1,
 
3559
        ValidID => $InvalidID,
3545
3560
        UserID  => 1,
3546
3561
    );
3547
3562
 
3556
3571
{
3557
3572
    my $Success = $TypeObject->TypeUpdate(
3558
3573
        %TypeData,
3559
 
        ValidID => 1,
 
3574
        ValidID => $InvalidID,
3560
3575
        UserID  => 1,
3561
3576
    );
3562
3577
 
3571
3586
{
3572
3587
    my $Success = $ServiceObject->ServiceUpdate(
3573
3588
        %ServiceData,
3574
 
        ValidID => 1,
 
3589
        ValidID => $InvalidID,
3575
3590
        UserID  => 1,
3576
3591
    );
3577
3592
 
3586
3601
{
3587
3602
    my $Success = $SLAObject->SLAUpdate(
3588
3603
        %SLAData,
3589
 
        ValidID => 1,
 
3604
        ValidID => $InvalidID,
3590
3605
        UserID  => 1,
3591
3606
    );
3592
3607
 
3601
3616
{
3602
3617
    my $Success = $StateObject->StateUpdate(
3603
3618
        %StateData,
3604
 
        ValidID => 1,
 
3619
        ValidID => $InvalidID,
3605
3620
        UserID  => 1,
3606
3621
    );
3607
3622
 
3617
3632
    my $Success = $PriorityObject->PriorityUpdate(
3618
3633
        %PriorityData,
3619
3634
        PriorityID => $PriorityID,
3620
 
        ValidID    => 1,
 
3635
        ValidID    => $InvalidID,
3621
3636
        UserID     => 1,
3622
3637
    );
3623
3638