diff --git a/t/google-custom-search.t b/t/google-custom-search.t index 33f03402..8dfb935d 100644 --- a/t/google-custom-search.t +++ b/t/google-custom-search.t @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Alex Schroeder +# Copyright (C) 2008, 2009 Alex Schroeder # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,13 +15,15 @@ require 't/test.pl'; package OddMuse; -use Test::More tests => 2; +use Test::More tests => 3; clear_pages(); add_module('google-custom-search.pl'); -xpath_test(update_page('the page'), +$page = update_page('the page'); +xpath_test($page, '//h1/a[text()="the page"][@rel="nofollow"][contains(@href,"q=%22the%20page%22")][@title="Click to search for references to this page"]'); +negative_xpath_test($page, '//h1/a[contains(@href,"localhost")]'); add_module('permanent-anchors.pl');