| | 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 ); |
| | 65 | unlike( $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 ); |
| | 69 | unlike( $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 ); |
| | 73 | like( $output, qr/ga.js/, "does show up if key is provided" ); |
| | 74 | like( $output, qr/ThisIsNotAKey/, "...correct key" ); |