|
Revision 430, 1.0 kB
(checked in by otsune, 6 years ago)
|
|
lang/perl/plagger/t/plugins/Filter-FLVInfo/base.t: fix
|
| Line | |
|---|
| 1 | use strict; |
|---|
| 2 | use FindBin; |
|---|
| 3 | use File::Path qw(rmtree); |
|---|
| 4 | |
|---|
| 5 | BEGIN { |
|---|
| 6 | use t::TestPlagger; |
|---|
| 7 | test_requires_network('mizzy.org:80'); |
|---|
| 8 | } |
|---|
| 9 | |
|---|
| 10 | our $tmpdir = "$FindBin::Bin/tmp"; |
|---|
| 11 | |
|---|
| 12 | plan 'no_plan'; |
|---|
| 13 | |
|---|
| 14 | run_eval_expected; |
|---|
| 15 | |
|---|
| 16 | END { rmtree $tmpdir if $tmpdir } |
|---|
| 17 | |
|---|
| 18 | __END__ |
|---|
| 19 | |
|---|
| 20 | === Test Filter::FLVInfo |
|---|
| 21 | --- input config |
|---|
| 22 | plugins: |
|---|
| 23 | - module: CustomFeed::Debug |
|---|
| 24 | config: |
|---|
| 25 | title: 'Test Filter::FLVInfo' |
|---|
| 26 | link: 'http://mizzy.org/plagger-test/' |
|---|
| 27 | entry: |
|---|
| 28 | - title: 'First Entry' |
|---|
| 29 | link: 'http://mizzy.org/plagger-test/' |
|---|
| 30 | body: 'Test Filter::FLVInfo' |
|---|
| 31 | summary: 'Test Filter::FLVInfo' |
|---|
| 32 | author: 'Yohei Fushii' |
|---|
| 33 | enclosure: |
|---|
| 34 | - url: http://mizzy.org/plagger-test/mizzy.flv |
|---|
| 35 | |
|---|
| 36 | - module: Filter::FetchEnclosure |
|---|
| 37 | config: |
|---|
| 38 | dir: $main::tmpdir |
|---|
| 39 | - module: Filter::FLVInfo |
|---|
| 40 | |
|---|
| 41 | --- expected |
|---|
| 42 | is $context->update->feeds->[0]->entries->[0]->meta->{flvinfo}->{height}, '240'; |
|---|
| 43 | is $context->update->feeds->[0]->entries->[0]->meta->{flvinfo}->{width}, '320'; |
|---|
| 44 | is $context->update->feeds->[0]->entries->[0]->meta->{flvinfo}->{aspect}, '4:3'; |
|---|