Show
Ignore:
Timestamp:
08/08/08 11:42:57 (5 months ago)
Author:
dom
Message:

Fix Google Analytics by not trying to escape the key

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/t/48_google_analytics.t

    r1203 r1204  
    1111} 
    1212 
    13 plan tests => 5; 
     13plan tests => 9; 
    1414 
    1515my ( $config, $guide, $wiki, $cookie, $output ); 
     
    5858like( $output, qr/ga.js/, "does show up if key is provided" ); 
    5959like( $output, qr/ThisIsNotAKey/, "...correct key" ); 
     60# Make sure analytics stuff only shows up if we want it to on recent changes 
     61# recent changes doesnt use CGI. which we dont need anymore but we should test in case we change our mind again. 
     62 
     63$config->google_analytics_key( "" ); 
     64$output = $guide->display_recent_changes( return_output => 1 ); 
     65unlike( $output, qr/ga.js/, "...also if analytics key is blank" ); 
     66 
     67$config->google_analytics_key( 0 ); 
     68$output = $guide->display_recent_changes( return_output => 1 ); 
     69unlike( $output, qr/ga.js/, "...also if analytics key is zero" ); 
     70 
     71$config->google_analytics_key( "ThisIsNotAKey" ); 
     72$output = $guide->display_recent_changes( return_output => 1 ); 
     73like( $output, qr/ga.js/, "does show up if key is provided" ); 
     74like( $output, qr/ThisIsNotAKey/, "...correct key" );