#!/perl
my
$tempdir
= tempdir(
"/tmp/tmpdir-XXXXXXXXXX"
,
CLEANUP
=> 1 );
ok(
my
$check
= App::Wubot::Plugin::WebFetch->new( {
class
=>
'App::Wubot::Plugin::OsxIdle'
,
cache_file
=>
'/dev/null'
,
key
=>
'OsxIdle-testcase'
,
} ),
"Creating a new WebFetch check instance"
);
{
};
ok(
my
$results
=
$check
->check( {
config
=>
$config
} ),
"Calling check() method"
);
like(
$results
->{react}->{content},
qr/Feeling Lucky/
,
"Checking that content contains 'Feeling Lucky'"
);
}
{
field
=>
'foo'
};
ok(
my
$results
=
$check
->check( {
config
=>
$config
} ),
"Calling check() method"
);
like(
$results
->{react}->{foo},
qr/Feeling Lucky/
,
"Checking that 'foo' field contains 'Feeling Lucky'"
);
}