IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5490 for trunk/Nebulous/t


Ignore:
Timestamp:
Nov 8, 2005, 3:31:07 PM (21 years ago)
Author:
jhoblitt
Message:

change create_object to verify that it's class param is valid

Location:
trunk/Nebulous/t
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/t/03_server_create_object.t

    r4873 r5490  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 03_server_create_object.t,v 1.5 2005-08-25 01:40:04 jhoblitt Exp $
     5# $Id: 03_server_create_object.t,v 1.6 2005-11-09 01:31:07 jhoblitt Exp $
    66
    77use strict;
    88use warnings FATAL => qw( all );
    99
    10 use Test::More tests => 11;
     10use Test::More tests => 13;
    1111
    1212use lib qw( ./t ./lib );
     
    7474Test::Nebulous->setup;
    7575
     76{
     77    my $uri = $neb->create_object( "foo", 1 );
     78
     79    ok( -e _get_file_path( $uri ), "class exists" );
     80}
     81
     82Test::Nebulous->setup;
     83
     84eval {
     85    $neb->create_object( "foo", 99 );
     86};
     87like( $@, qr/Invalid class/, "class doesn't exists" );
     88
     89Test::Nebulous->setup;
     90
    7691eval {
    7792    $neb->create_object();
  • trunk/Nebulous/t/Test/Nebulous.pm

    r4893 r5490  
    11# Copyright (C) 2004  Joshua Hoblitt
    22#
    3 # $Id: Nebulous.pm,v 1.6 2005-08-27 03:39:06 jhoblitt Exp $
     3# $Id: Nebulous.pm,v 1.7 2005-11-09 01:31:07 jhoblitt Exp $
    44
    55package Test::Nebulous;
     
    3939    $dbh->do( qq{ INSERT INTO volume VALUES (1,'node01',?) }, undef, 'file:' . $dir1 );
    4040    $dbh->do( qq{ INSERT INTO volume VALUES (2,'node02',?) }, undef, 'file:' . $dir2 );
     41
     42    $dbh->do( qq{ INSERT INTO class VALUES (1, 0, "regular data") } );
     43    $dbh->do( qq{ INSERT INTO class VALUES (2, 1, "special data") } );
    4144}
    4245
Note: See TracChangeset for help on using the changeset viewer.