1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-04 22:19:38 +00:00
fhem-mirror/t/FHEM/70_BRAVIA/CheckRegistration.t
vuffiraa a146daa349 70_BRAVIA.pm: fix registration renewal
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24219 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2021-04-11 14:29:19 +00:00

40 lines
866 B
Perl

################################################
# test Set
################################################
package FHEM::BRAVIA;
use strict;
use warnings;
use Test::More;
# used to import of FHEM functions from fhem.pl
use GPUtils qw(:all);
BEGIN {
GP_Import(
qw(
fhem
FhemTestUtils_gotLog
FhemTestUtils_resetLogs
)
);
}
# execute checkRegistration
{
CheckRegistration($::defs{tv});
}
is(FhemTestUtils_gotLog("BRAVIA tv: authCookie not valid ' '"), 1, "Registration missing");
FhemTestUtils_resetLogs();
fhem('setreading tv authCookie test');
{
CheckRegistration($::defs{tv});
}
is(FhemTestUtils_gotLog("BRAVIA tv: authCookie not valid '.*'"), 0, "Registration valid");
is(FhemTestUtils_gotLog("BRAVIA tv: registration valid until .*"), 1, "Registration period");
done_testing;
exit(0);
1;