From b68775feb50d4bc5c30df87b7292f5be57cc3da2 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Thu, 22 Jan 2009 00:31:51 +0000 Subject: [PATCH] Added another test to show that the search URL works --- t/google-custom-search.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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');