Skip to content

Commit

Permalink
Item11247: Slightly unbreak some tests
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/RestPlugin@13056 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Nov 10, 2011
1 parent b340d09 commit 5e36772
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/unit/RestPlugin/RestPluginTests.pm
Expand Up @@ -125,16 +125,16 @@ sub testGET_webs {
my $this = shift;
##WEB
{
my ( $meta, $text ) = Foswiki::Func::readTopic('System');
my $meta = Foswiki::Meta->load($this->{session}, $Foswiki::cfg{SystemWebName});

my ( $replytext, $hdr ) =
$this->call_UI_query( '/' . 'System' . '/webs.json', 'GET', {} );
$this->call_UI_query( '/' . $Foswiki::cfg{SystemWebName} . '/webs.json', 'GET', {} );
my $fromJSON = JSON::from_json( $replytext, { allow_nonref => 1 } );
$this->assert_deep_equals( $fromJSON,
[ Foswiki::Serialise::convertMeta($meta) ] );
}
{
my ( $meta, $text ) = Foswiki::Func::readTopic( $this->{test_web} );
my $meta = Foswiki::Meta->load( $this->{test_web} );

my ( $replytext, $hdr ) =
$this->call_UI_query( '/' . $this->{test_web} . '/webs.json',
Expand All @@ -151,7 +151,7 @@ sub TODOtestGET_webs_doesnotexist {

#TODO: does not exist
{
my ( $meta, $text ) = Foswiki::Func::readTopic('SystemDoesNotExist');
my $meta = Foswiki::Meta->load('SystemDoesNotExist');

try {
my ( $replytext, $hdr ) =
Expand All @@ -176,7 +176,8 @@ sub testGET_allwebs {
{

#get all webs..
my ( $meta, $text ) = Foswiki::Func::readTopic('SystemDoesNotExist');
#commented out by PH. WTF?
#my ( $meta, $text ) = Foswiki::Func::readTopic('SystemDoesNotExist');

my ( $replytext, $hdr ) =
$this->call_UI_query( '/webs.json', 'GET', {} );
Expand All @@ -185,7 +186,7 @@ sub testGET_allwebs {

my @webs = Foswiki::Func::getListOfWebs( '', '' );
my @results = map {
my ( $meta, $text ) = Foswiki::Func::readTopic($_);
my $meta = Foswiki::Meta->load($this->{session}, $_);
print STDERR "::::: load($_) == " . $meta->web . "\n"
if MONITOR_ALL;
Foswiki::Serialise::convertMeta($meta)
Expand Down

0 comments on commit 5e36772

Please sign in to comment.