IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5262


Ignore:
Timestamp:
Oct 10, 2005, 2:09:13 PM (21 years ago)
Author:
jhoblitt
Message:

add recipient key
test for missing keys

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-PSFTP/t/03_psftp.t

    r5260 r5262  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: 03_psftp.t,v 1.1 2005-10-10 22:46:33 jhoblitt Exp $
     5# $Id: 03_psftp.t,v 1.2 2005-10-11 00:09:13 jhoblitt Exp $
    66
    77use strict;
     
    1010use lib qw( ./lib ./t );
    1111
    12 use Test::More qw( no_plan );
     12use Test::More tests => 3;
    1313
    1414use PS::IPP::PSFTP;
    1515
    1616{
    17     my $psftp = PS::IPP::PSFTP->new( base_url => 'http://example.com' );
     17    my $psftp = PS::IPP::PSFTP->new(
     18        base_url    => 'http://example.com',
     19        recipient   => 'ipp',
     20    );
    1821    isa_ok($psftp, 'PS::IPP::PSFTP');
    1922}
     23
     24eval {
     25    my $psftp = PS::IPP::PSFTP->new(
     26        base_url    => 'http://example.com',
     27    );
     28};
     29like($@, qr/Mandatory parameter 'recipient' missing/, "no recipient param");
     30
     31eval {
     32    my $psftp = PS::IPP::PSFTP->new(
     33        recipient   => 'ipp',
     34    );
     35};
     36like($@, qr/Mandatory parameter 'base_url' missing/, "no recipient param");
Note: See TracChangeset for help on using the changeset viewer.