File: WebService-YouTube-Util.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 (46 lines) | stat: -rwxr-xr-x 1,033 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
46
#!/usr/bin/env perl
#
# $Id: WebService-YouTube-Util.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 => 5;

use WebService::YouTube::Util;

can_ok(
    'WebService::YouTube::Util', qw(
      rss_uri
      rest_uri
      get_video_uri
      get_video
      )
);
is(
    WebService::YouTube::Util->rss_uri( 'global', 'arg' ),
    'http://www.youtube.com/rss/global/arg.rss',
    'rss_uri'
);
is(
    WebService::YouTube::Util->rest_uri(
        'dev_id', 'method', { key => 'value' }
    ),
    'http://www.youtube.com/api2_rest?dev_id=dev_id&method=method&key=value',
    'rest_uri'
);

SKIP: {
    if ( !$ENV{TEST_YOUTUBE} ) {
        skip 'set TEST_YOUTUBE for testing WebService::YouTube::Util', 1;
    }
    ok( WebService::YouTube::Util->get_video_uri('rdwz7QiG0lk'),
        'Got URI of the video' );
}

SKIP: {
    skip 'It takes a long time', 1;
    ok( WebService::YouTube::Util->get_video('rdwz7QiG0lk'), 'Got the video' );
}