From 4b350fb5e986459d250b954db625d6299d6bd630 Mon Sep 17 00:00:00 2001 From: miyagawa Date: Tue, 14 Dec 2004 10:50:39 +0000 Subject: Initial revision git-svn-id: http://svn.bulknews.net/repos/public/WebService-Google-Suggest/trunk@1503 65690182-5df0-0310-9871-95da5a3706e7 --- t/00_compile.t | 4 ++++ t/01_suggest.t | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 t/00_compile.t create mode 100644 t/01_suggest.t (limited to 't') diff --git a/t/00_compile.t b/t/00_compile.t new file mode 100644 index 0000000..bcaa28f --- /dev/null +++ b/t/00_compile.t @@ -0,0 +1,4 @@ +use strict; +use Test::More tests => 1; + +BEGIN { use_ok 'WebService::Google::Suggest' } diff --git a/t/01_suggest.t b/t/01_suggest.t new file mode 100644 index 0000000..7db220e --- /dev/null +++ b/t/01_suggest.t @@ -0,0 +1,13 @@ +use strict; +use Test::More tests => 4; + +BEGIN { use_ok 'WebService::Google::Suggest' } + +my $suggest = WebService::Google::Suggest->new(); + +isa_ok($suggest->ua, "LWP::UserAgent", "ua() retuens LWP"); + +my @data = $suggest->complete("google"); +is($data[0]->{query}, "google", "google completes to google"); +is_deeply( [ $suggest->complete("udfg67a") ], [ ], "empty list" ); + -- cgit 1.4.1