2022-02-04 22:10:33 +01:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use v5.30.0;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Test::Most tests => 3;
|
|
|
|
use Test::MockModule;
|
|
|
|
use Test::MockObject;
|
|
|
|
|
|
|
|
BEGIN {
|
|
|
|
unshift @INC, 'lib';
|
2022-02-06 18:07:40 +01:00
|
|
|
use_ok 'DoctorKarma::Telegram';
|
2022-02-04 22:10:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
my $result = 'hola';
|
2022-02-06 18:07:40 +01:00
|
|
|
my $telegram = DoctorKarma::Telegram->new (telegram_token => $result);
|
|
|
|
ok $telegram->isa('DoctorKarma::Telegram'), 'Telegram object created successfully.';
|
2022-02-04 22:10:33 +01:00
|
|
|
is $telegram->_telegram_token, $result, 'Telegram token setup was successful.';
|
|
|
|
}
|