Changeset 1820

Show
Ignore:
Timestamp:
05/17/06 23:03:04
Author:
bricas
Message:

updated some tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WWW-OpenSearch/branches/WWW-OpenSearch-rewrite/t/00_compile.t

    r1802 r1820  
    11use strict; 
    2 use Test::More tests => 1
     2use Test::More tests => 4
    33 
    4 BEGIN { use_ok 'WWW::OpenSearch' } 
     4BEGIN { 
     5    use_ok 'WWW::OpenSearch'; 
     6    use_ok 'WWW::OpenSearch::Description'; 
     7    use_ok 'WWW::OpenSearch::Response'; 
     8    use_ok 'WWW::OpenSearch::Url'; 
     9
  • WWW-OpenSearch/branches/WWW-OpenSearch-rewrite/t/01_live.t

    r1802 r1820  
    1515my $engine = WWW::OpenSearch->new($url); 
    1616ok $engine; 
    17 ok $engine->ShortName, $engine->ShortName; 
     17ok $engine->description->shortname, $engine->description->shortname; 
    1818 
    19 my $feed = $engine->search("iPod"); 
    20 ok $feed; 
    21 ok $feed->channel->{title}, $feed->channel->{title}; 
    22 ok $feed->channel->{link}, $feed->channel->{link}; 
    23 ok $engine->pager->entries_per_page, "items per page " . $engine->pager->entries_per_page; 
    24 ok $engine->pager->total_entries, "total entries " . $engine->pager->total_entries; 
    25  
    26  
     19my $res = $engine->search("iPod"); 
     20ok $res; 
     21ok $res->feed->title, $res->feed->title; 
     22ok $res->feed->link, $res->feed->link; 
     23ok $res->pager->entries_per_page, "items per page " . $res->pager->entries_per_page; 
     24ok $res->pager->total_entries, "total entries " . $res->pager->total_entries;