Skip to content

Commit

Permalink
Item8448: trying to find "FORMFIELD does not display value if it is 0…
Browse files Browse the repository at this point in the history
…" but it's working in the low level of Meta::renderFormFieldForDisplay; perhaps the problem lies in Foswiki::Render::renderFORMFIELD?

git-svn-id: http://svn.foswiki.org/trunk@6202 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
WillNorris authored and WillNorris committed Feb 1, 2010
1 parent f2a517a commit f565054
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion UnitTestContrib/test/unit/RenderFormTests.pm
Expand Up @@ -221,6 +221,9 @@ HERE
value => "GRRR "
}
);
$meta->putKeyed( FIELD => { name=>'ZeroString', attributes=>'', title=>'Zero', value=>'0' } );
$meta->putKeyed( FIELD => { name=>'ZeroNumber', attributes=>'', title=>'Zero', value=>0 } );

Foswiki::Func::saveTopic( $this->{test_web}, $testtopic2, $meta, 'TT2' );
}

Expand Down Expand Up @@ -286,7 +289,10 @@ sub test_render_formfield_raw {
$meta->renderFormFieldForDisplay( "State", '',
{ newline => 'NL', bar => "BAR" } );
$this->assert_str_equals( '', $res );

$res = $meta->renderFormFieldForDisplay( 'ZeroString', '$value' );
$this->assert_str_equals('0', $res);
$res = $meta->renderFormFieldForDisplay( 'ZeroNumber', '$value' );
$this->assert_str_equals('0', $res);
}

# Simple test; form in place, just check value rendering
Expand Down

0 comments on commit f565054

Please sign in to comment.