mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@22692 2b470e98-0d58-463d-a4d8-8e2adae1ed80
28 lines
761 B
Perl
28 lines
761 B
Perl
##############################################
|
|
# test extractAllReadings
|
|
##############################################
|
|
use strict;
|
|
use warnings;
|
|
use Test::More;
|
|
|
|
eval "use JSON";
|
|
if ($@) {
|
|
plan skip_all => "This test checks an optional JSON-Feature of HTTPMOD and can only be run with the JSON library installed. Please install JSON Library (apt-get install libjson-perl)";
|
|
} else {
|
|
plan tests => 3;
|
|
}
|
|
|
|
|
|
fhem('set H1 reread');
|
|
InternalTimer(time()+1, sub() {
|
|
|
|
is(FhemTestUtils_gotLog("Read response matched 24"), 1, "Match 24 Readings log");
|
|
is(FhemTestUtils_gotEvent("H1:MQTT_ip_1: 168"), 1, "Reading creation 1");
|
|
is(FhemTestUtils_gotEvent("H1:modes_2: RainbowChase"), 1, "Reading creation 2");
|
|
|
|
done_testing;
|
|
exit(0);
|
|
}, 0);
|
|
|
|
1;
|