From d31f77eae4c4646ef1a99c5f7e7ddc1654add27d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 17 Jun 2013 16:28:21 +0200 Subject: [PATCH] TestSetup auf clients angepasst --- t/Support/TestSetup.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/Support/TestSetup.pm b/t/Support/TestSetup.pm index 671e6d9dc..2fbbd2d5f 100644 --- a/t/Support/TestSetup.pm +++ b/t/Support/TestSetup.pm @@ -15,9 +15,9 @@ use SL::InstanceConfiguration; use SL::Request; sub _login { - my $login = shift; + my ($client, $login) = @_; - die 'need login' unless $login; + die 'need client and login' unless $client && $login; package main; @@ -26,6 +26,8 @@ sub _login { $::locale = Locale->new($::lx_office_conf{system}->{language}); $::form = Form->new; $::auth = SL::Auth->new; + die "Cannot find client with ID or name '$client'" if !$::auth->set_client($client); + $::instance_conf = SL::InstanceConfiguration->new; $::request = SL::Request->new( cgi => CGI->new({}), layout => SL::Layout::None->new ); @@ -50,7 +52,8 @@ sub login { SL::LxOfficeConf->read; my $login = shift || $::lx_office_conf{testing}{login} || 'demo'; - _login($login); + my $client = shift || $::lx_office_conf{testing}{client} || ''; + _login($client, $login); } 1; -- 2.20.1