File: 03auto_commit.t

package info (click to toggle)
libcal-dav-perl 0.6-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 108 kB
  • sloc: perl: 266; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (5)
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
#!perl -w

use strict;
use lib qw(t);
use Cal::DAV;
use Test::More;
use CalDAVTest;

for (qw(CAL_DAV_USER CAL_DAV_PASS CAL_DAV_URL_BASE)) {
    if (!defined $ENV{$_}) {
        plan skip_all => "Need to provide a $_ environment variable";
    }
}
plan tests => 5;

my $cal;
ok($cal = get_cal_dav('new.ics', 1), "Instantiated ok");

# Parse
ok($cal->parse(filename => 't/ics/new.ics'), "Parsed a file");

# Destroy
$cal = undef;

# Get 
ok($cal = get_cal_dav('new.ics'), "Instantiated ok again");

# Check
is(scalar(@{$cal->entries}), 1, "Got 1 entry");

ok($cal->delete, "Delete");