diff options
author | miyagawa <miyagawa@65690182-5df0-0310-9871-95da5a3706e7> | 2004-12-14 10:50:39 +0000 |
---|---|---|
committer | miyagawa <miyagawa@65690182-5df0-0310-9871-95da5a3706e7> | 2004-12-14 10:50:39 +0000 |
commit | 4b350fb5e986459d250b954db625d6299d6bd630 (patch) | |
tree | 248466f5d0dbe2760ca927e1bc59f1d9a0ddb84a /t | |
download | webservice-google-suggest-4b350fb5e986459d250b954db625d6299d6bd630.tar.gz |
Initial revision
git-svn-id: http://svn.bulknews.net/repos/public/WebService-Google-Suggest/trunk@1503 65690182-5df0-0310-9871-95da5a3706e7
Diffstat (limited to 't')
-rw-r--r-- | t/00_compile.t | 4 | ||||
-rw-r--r-- | t/01_suggest.t | 13 |
2 files changed, 17 insertions, 0 deletions
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" ); + |