File: module.t

package info (click to toggle)
libmetacpan-client-perl 2.033000-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: perl: 2,564; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 663 bytes parent folder | download | duplicates (4)
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
#!perl

use strict;
use warnings;
use Test::More tests => 10;
use Test::Fatal;

use lib '.';
use t::lib::Functions;

my $mc = mcpan();
can_ok( $mc, 'module' );

my $module = $mc->module('MetaCPAN::API');
isa_ok( $module, 'MetaCPAN::Client::Module' );
can_ok( $module, qw<distribution name path> );
is( $module->distribution, 'MetaCPAN-API', 'Correct distribution' );
is( $module->name, 'API.pm', 'Correct name' );
is( $module->path, 'lib/MetaCPAN/API.pm', 'Correct path' );

my $rs = $mc->module( { path => 'lib/MetaCPAN' } );
isa_ok( $rs, 'MetaCPAN::Client::ResultSet' );
can_ok( $rs, 'total' );
ok( $rs->total > 0, 'More than a single result in result set' );