Changeset 380
- Timestamp:
- 06/10/04 23:25:32 (5 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
lib/OpenGuides.pm (modified) (1 diff)
-
t/53_show_index.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/OpenGuides.pm
r379 r380 454 454 vars => $args{tt_vars}, 455 455 ); 456 $output_conf{content_type} = $args{content_type} if $args{content_type}; 457 return OpenGuides::Template->output( %output_conf ); 456 if ( $args{content_type} ) { 457 $output_conf{content_type} = ""; 458 my $output = "Content-Type: $args{content_type}\n\n" 459 . OpenGuides::Template->output( %output_conf ); 460 } else { 461 return OpenGuides::Template->output( %output_conf ); 462 } 458 463 } 459 464 -
trunk/t/53_show_index.t
r379 r380 3 3 use Config::Tiny; 4 4 use OpenGuides; 5 use Test::More tests => 3;5 use Test::More tests => 4; 6 6 7 7 eval { require DBD::SQLite; }; … … 9 9 10 10 SKIP: { 11 skip "DBD::SQLite not installed - no database to test with", 311 skip "DBD::SQLite not installed - no database to test with", 4 12 12 unless $have_sqlite; 13 13 … … 42 42 }; 43 43 is( $@, "", "->show_index doesn't die" ); 44 $output = $guide->show_index( 45 type => "category", 46 value => "Alpha", 47 return_output => 1, 48 format => "rdf" 49 ); 50 like( $output, qr|Content-Type: text/plain|, 51 "RDF output gets content-type of text/plain" ); 44 52 }
