[otrs-cvs] GeneralCatalog/scripts/test GeneralCatalog.t,1.11,1.12

cvs-log at otrs.org cvs-log at otrs.org
Tue Mar 11 09:15:48 GMT 2008


Comments:
Update of /home/cvs/GeneralCatalog/scripts/test
In directory lancelot:/tmp/cvs-serv11576/scripts/test

Modified Files:
	GeneralCatalog.t 
Log Message:
Fixed small bug in user creation section.

Author: mh

Index: GeneralCatalog.t
===================================================================
RCS file: /home/cvs/GeneralCatalog/scripts/test/GeneralCatalog.t,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** GeneralCatalog.t	10 Mar 2008 17:46:04 -0000	1.11
--- GeneralCatalog.t	11 Mar 2008 09:15:43 -0000	1.12
***************
*** 22,43 ****
  $Self->{UserObject}           = Kernel::System::User->new( %{$Self} );
  
  # create new users for the tests
  my $UserID1 = $Self->{UserObject}->UserAdd(
!     UserFirstname => 'UnitTest1',
!     UserLastname  => 'UnitTest1',
      UserLogin     => 'UnitTest-GeneralCatalog-1' . int( rand(1_000_000) ),
!     UserEmail     => 'unittest1 at localhost',
      ValidID       => 1,
      ChangeUserID  => 1,
  );
  my $UserID2 = $Self->{UserObject}->UserAdd(
!     UserFirstname => 'UnitTest2',
!     UserLastname  => 'UnitTest2',
      UserLogin     => 'UnitTest-GeneralCatalog-2' . int( rand(1_000_000) ),
!     UserEmail     => 'unittest2 at localhost',
      ValidID       => 1,
      ChangeUserID  => 1,
  );
  
  # create some random numbers for the classes
  my $ClassRand1 = int( rand(1_000_000) );
--- 22,53 ----
  $Self->{UserObject}           = Kernel::System::User->new( %{$Self} );
  
+ # disable email checks to create new user
+ my $CheckEmailAddressesOrg = $Self->{ConfigObject}->Get('CheckEmailAddresses') || 1;
+ $Self->{ConfigObject}->Set( Key => 'CheckEmailAddresses', Value => 0 );
+ 
  # create new users for the tests
  my $UserID1 = $Self->{UserObject}->UserAdd(
!     UserFirstname => 'GeneralCatalog1',
!     UserLastname  => 'UnitTest',
      UserLogin     => 'UnitTest-GeneralCatalog-1' . int( rand(1_000_000) ),
!     UserEmail     => 'UnitTest-GeneralCatalog-1 at localhost',
      ValidID       => 1,
      ChangeUserID  => 1,
  );
  my $UserID2 = $Self->{UserObject}->UserAdd(
!     UserFirstname => 'GeneralCatalog2',
!     UserLastname  => 'UnitTest',
      UserLogin     => 'UnitTest-GeneralCatalog-2' . int( rand(1_000_000) ),
!     UserEmail     => 'UnitTest-GeneralCatalog-2 at localhost',
      ValidID       => 1,
      ChangeUserID  => 1,
  );
  
+ # restore original email check param
+ $Self->{ConfigObject}->Set(
+     Key   => 'CheckEmailAddresses',
+     Value => $CheckEmailAddressesOrg,
+ );
+ 
  # create some random numbers for the classes
  my $ClassRand1 = int( rand(1_000_000) );


More information about the cvs-log mailing list