Skip to content

Commit

Permalink
Item12477: unit test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Comment committed Dec 19, 2014
1 parent b50a395 commit 98cf266
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions UnitTestContrib/test/unit/FormDefTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ FORM
$this->assert_str_equals( 'Date', $f->{title} );
$this->assert_str_equals( '30', $f->{size} );
$this->assert_str_equals( '', $f->{value} );
$this->assert_str_equals( '', $f->{tooltip} );
$this->assert_str_equals( '', $f->{description} );
$this->assert_str_equals( '', $f->{definingTopic} );

return;
Expand Down Expand Up @@ -68,15 +68,15 @@ FORM
$this->assert_equals( 4, $f->{maxSize} );
$this->assert_equals( 3, scalar( @{ $f->getOptions() } ) );
$this->assert_str_equals( 'a,b,c', join( ',', @{ $f->getOptions() } ) );
$this->assert_str_equals( 'Tippity', $f->{tooltip} );
$this->assert_str_equals( 'Tippity', $f->{description} );
$this->assert_str_equals( '', $f->{definingTopic} );
$f = $def->getField('CheckyEgg');
$this->assert_str_equals( 'checkbox', $f->{type} );
$this->assert_str_equals( 'CheckyEgg', $f->{name} );
$this->assert_str_equals( 'Checky Egg', $f->{title} );
$this->assert_equals( 1, $f->{size} );
$this->assert_str_equals( '1;2;3;4', join( ';', @{ $f->getOptions() } ) );
$this->assert_str_equals( 'Blip', $f->{tooltip} );
$this->assert_str_equals( 'Blip', $f->{description} );
$this->assert_str_equals( '', $f->{definingTopic} );

$f = $def->getField('Thetitle');
Expand Down Expand Up @@ -351,7 +351,7 @@ FORM
$this->assert_equals( 6, scalar( @{ $f->getOptions() } ) );
$this->assert_str_equals( ',0,One,2,III,Four',
join( ',', @{ $f->getOptions() } ) );
$this->assert_str_equals( 'Various values', $f->{tooltip} );
$this->assert_str_equals( 'Various values', $f->{description} );
$def->finish();

return;
Expand Down
3 changes: 2 additions & 1 deletion UnitTestContrib/test/unit/RenameTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2349,8 +2349,9 @@ EOF
path_info => "/Renamed$this->{test_web}/WebHome"
}
);
my ( $text, $result, $stdout, $stderr ) =
$this->captureWithKey( rename => $UI_FN, $this->{session} );

my ($text) = $this->captureWithKey( rename => $UI_FN, $this->{session} );
$this->assert( Foswiki::Func::webExists("RENAMED$this->{test_web}") );
$this->assert( !Foswiki::Func::webExists("Renamed$this->{test_web}") );

Expand Down
4 changes: 2 additions & 2 deletions core/lib/Foswiki/Meta.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2321,7 +2321,7 @@ sub move {
Foswiki::Meta->load( $this->{_session}, $this->web,
$Foswiki::cfg{WebPrefsTopicName} );
my $to =
Foswiki::Meta->new( $this->{_session}, $to->web,
Foswiki::Meta->load( $this->{_session}, $to->web,
$Foswiki::cfg{WebPrefsTopicName} );
$this->{_session}->{store}->recordChange(
cuid => $cUID,
Expand Down Expand Up @@ -2838,8 +2838,8 @@ sub attach {
# make sure we don't save a half-loaded topic stub...
# which indeed - SMELL - is possible
$this->loadVersion() unless $this->latestIsLoaded();
ASSERT( $this->latestIsLoaded(), $this->getPath() ) if DEBUG;

#ASSERT( $this->latestIsLoaded(), $this->getPath() ) if DEBUG;
#ASSERT( $this->{_loadedRev}, $this->getPath() ) if DEBUG;

if ( $opts{file} && !$opts{stream} ) {
Expand Down
1 change: 0 additions & 1 deletion core/lib/Foswiki/UI/Rename.pm
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ sub _renameWeb {
Foswiki::UI::checkWebExists( $session, $newParentWeb,
$Foswiki::cfg{WebPrefsTopicName}, 'rename' );
}

if ( $session->webExists($newWeb) ) {
throw Foswiki::OopsException(
'attention',
Expand Down

0 comments on commit 98cf266

Please sign in to comment.