Changeset 990
- Timestamp:
- 03/24/07 23:24:17 (20 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
lib/OpenGuides/Template.pm (modified) (1 diff)
-
t/44_node_image.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/OpenGuides/Template.pm
r937 r990 331 331 my $value = $args{metadata} ? $metadata{$key}[0] 332 332 : $q->param( $key ); 333 if ( $value ) { 334 $value =~ s/^\s+//g; 335 $value =~ s/\s+$//g; 336 } 333 337 $vars{$key} = $value if $value; 334 338 } -
trunk/t/44_node_image.t
r956 r990 16 16 } 17 17 18 plan tests => 28;18 plan tests => 30; 19 19 20 20 my ( $config, $guide, $wiki ); … … 187 187 Test::HTML::Content::text_ok( $output, "http://eg.com/~kake/", 188 188 "...as does new node_image_url value" ); 189 190 # Write node with node_image field consisting only of whitespace, make 191 # sure it gets stripped. 192 OpenGuides::Test->write_data( 193 guide => $guide, 194 node => "Angel and Greyhound", 195 node_image => " ", 196 ); 197 %node_data = $wiki->retrieve_node( "Angel and Greyhound" ); 198 #use Data::Dumper; print Dumper \%node_data; 199 ok( !$node_data{metadata}{node_image}, 200 "node_image of whitespace only isn't saved to database" ); 201 202 $output = $guide->display_node( 203 id => "Angel and Greyhound", 204 return_output => 1, 205 ); 206 $output =~ s/^Content-Type.*[\r\n]+//m; 207 Test::HTML::Content::no_tag( $output, "img" => { id => "node_image" }, 208 "...or displayed on page" );
