File: WebService-YouTube-Feeds.t

package info (click to toggle)
libwebservice-youtube-perl 1.0.3-4.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 416 kB
  • sloc: perl: 5,070; makefile: 4
file content (45 lines) | stat: -rwxr-xr-x 955 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env perl
#
# $Id: WebService-YouTube-Feeds.t 11 2007-04-09 04:34:01Z hironori.yoshida $
#
use strict;
use warnings;
use version; our $VERSION = qv('1.0.3');

use blib;
use Test::Base tests => 16;

use WebService::YouTube::Feeds;

can_ok( 'WebService::YouTube::Feeds', qw(new ua) );
my $feeds = WebService::YouTube::Feeds->new;

can_ok( $feeds, qw(tag user) );

my @global_rss = qw(
  recently_added
  recently_featured
  top_favorites
  top_rated
  most_discussed_month
  most_discussed_today
  most_discussed_week
  top_viewed
  top_viewed_month
  top_viewed_today
  top_viewed_week
);

can_ok( $feeds, @global_rss );

SKIP: {
    if ( !$ENV{TEST_YOUTUBE} ) {
        skip 'set TEST_YOUTUBE for testing WebService::YouTube::Feeds',
          @global_rss + 2;
    }
    ok( $feeds->tag('monkey'),   'tag' );
    ok( $feeds->user('YouTube'), 'user' );
    foreach my $rss (@global_rss) {
        cmp_ok( $feeds->$rss, q{==}, 15, $rss );
    }
}