Skip to content

Commit

Permalink
Item1971: fix trunk unit tests - failure due to some change in how th…
Browse files Browse the repository at this point in the history
…e switchboard operates?

git-svn-id: http://svn.foswiki.org/trunk@4708 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Aug 26, 2009
1 parent b04f2a8 commit 490d878
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion UnitTestContrib/test/unit/FoswikiFnTestCase.pm
Expand Up @@ -167,9 +167,11 @@ sub getUIFn {
my $script = shift;
require Foswiki::UI;
$this->assert( $Foswiki::cfg{SwitchBoard}{$script}, $script );
$this->assert($Foswiki::cfg{SwitchBoard}{$script}->{package}, "$script package not set");
my $fn = $Foswiki::cfg{SwitchBoard}{$script}->{package};
eval "require $fn";
die $@ if $@;
die "DIED during (require $fn)\n".$@ if $@;
$this->assert($Foswiki::cfg{SwitchBoard}{$script}->{function}, "$script function not set");
$fn .= '::' . $Foswiki::cfg{SwitchBoard}{$script}->{function};
return \&$fn;
}
Expand Down
4 changes: 2 additions & 2 deletions UnitTestContrib/test/unit/ViewFileScriptTests.pm
Expand Up @@ -4,6 +4,7 @@ use base qw(FoswikiFnTestCase);

use strict;
use Foswiki;
use Foswiki::UI;
use Foswiki::UI::Viewfile;
use Unit::Request;
use Error qw( :try );
Expand All @@ -25,8 +26,6 @@ sub set_up {
my $this = shift;
$this->SUPER::set_up();

$UI_FN ||= $this->getUIFn('viewfile');

$fatwilly = $this->{session};
my $topic = 'TestTopic1';
my $topicObject =
Expand Down Expand Up @@ -133,6 +132,7 @@ sub viewfile {
$query->setUrl($url);
$query->method('GET');
$fatwilly = new Foswiki( $this->{test_user_login}, $query );
$UI_FN ||= $this->getUIFn('viewfile');
$this->{request} = $query;
$this->{response} = new Unit::Response();
my ($text) = $this->capture(
Expand Down

0 comments on commit 490d878

Please sign in to comment.