summary refs log tree commit diff
path: root/t/01_suggest.t
blob: 5660d243e3989deb22682a8610468d9d28e7adf7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use strict;
use Test::More tests => 5;

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 maps", "google completes to google maps");
ok($data[0]->{results}, "google has more than 0 results");
is_deeply( [ $suggest->complete("udfg67a") ], [ ], "empty list" );