Tests: eigene Datenbank für Unit-Tests hochziehen
[kivitendo-erp.git] / t / Support / TestSetup.pm
index bd067d2..f7b43cd 100644 (file)
@@ -15,10 +15,11 @@ use SL::LxOfficeConf;
 use SL::InstanceConfiguration;
 use SL::Request;
 
-sub _login {
-  my ($client, $login) = @_;
+sub login {
+  SL::LxOfficeConf->read;
 
-  die 'need client and login' unless $client && $login;
+  my $client = 'Unit-Tests';
+  my $login  = 'unittests';
 
   package main;
 
@@ -51,14 +52,6 @@ sub _login {
   return 1;
 }
 
-sub login {
-  SL::LxOfficeConf->read;
-
-  my $login        = shift || $::lx_office_conf{testing}{login}        || 'demo';
-  my $client        = shift || $::lx_office_conf{testing}{client}      || '';
-  _login($client, $login);
-}
-
 sub templates_cache_writable {
   my $dir = $::lx_office_conf{paths}->{userspath} . '/templates-cache';
   return 1 if -w $dir;