Skip to content

Commit

Permalink
Merge 80ccbca into 8729720
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpalmer committed Nov 16, 2019
2 parents 8729720 + 80ccbca commit b633769
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
@@ -1,10 +1,10 @@
language: perl
perl:
- "5.12"
- "5.14"
- "5.16"
- "5.18"
- "5.20"
- "5.22"
- "5.24"
- "5.26"
- "5.28"
- "5.30"

before_install:
cpanm -n Devel::Cover::Report::Coveralls XML::OPML::SimpleGen
Expand Down
13 changes: 13 additions & 0 deletions t/07_page.t
@@ -0,0 +1,13 @@
use strict;
use warnings;
use Test::More;
use_ok('Perlanet');

# Test fetching a page without the cache trait.
ok(my $p = Perlanet->new(), 'Object created');
isa_ok($p, 'Perlanet');
ok(my $page = $p->fetch_page('http://blogs.dave.org.uk/rss.xml'),
'Page fetched');
isa_ok($page, 'URI::Fetch::Response');

done_testing();
35 changes: 35 additions & 0 deletions t/08_opml.t
@@ -0,0 +1,35 @@
use strict;
use warnings;
use Test::More;
use FindBin qw($Bin);
use File::Temp qw(tempfile);
use_ok('Perlanet::Simple');

chdir $Bin;
ok(my $p = Perlanet::Simple->new_with_config(configfile => 'testrc'),
'Object created');
isa_ok($p,'Perlanet');

SKIP: {
skip 'XML::OPML::SimpleGen not installed', 1 unless $p->has_opml;

my (undef, $opml_file) = tempfile(OPEN => 0);
$p->opml($opml_file);
$p->run();
$p->save_opml();
ok(-e $opml_file, 'OPML file created');

if (-e $p->opml) {
unlink $p->opml;
}

if (-e $p->feed->{file}) {
unlink $p->feed->{file};
}

if (-e $p->page->{file}) {
unlink $p->page->{file};
}
}

done_testing();

0 comments on commit b633769

Please sign in to comment.