App-SpreadRevolutionaryDate

 view release on metacpan or  search on metacpan

SIGNATURE  view on Meta::CPAN

This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.87.

To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:

    % cpansign -v

It will check each file's integrity, as well as the signature's
validity.  If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.

-----BEGIN PGP SIGNED MESSAGE-----

t/objects.t  view on Meta::CPAN

isa_ok($spread_revolutionary_date->targets->{twitter}->obj, 'Twitter::API__WITH__Twitter::API::Trait::ApiMethods', 'Twitter object');
isa_ok($spread_revolutionary_date->targets->{mastodon}, 'App::SpreadRevolutionaryDate::Target::Mastodon', 'Mastodon class constructor');
isa_ok($spread_revolutionary_date->targets->{mastodon}->obj, 'Mastodon::Client', 'Mastodon object');
isa_ok($spread_revolutionary_date->targets->{freenode}, 'App::SpreadRevolutionaryDate::Target::Freenode', 'Freenode class constructor');
isa_ok($spread_revolutionary_date->targets->{freenode}->obj, 'App::SpreadRevolutionaryDate::Target::Freenode::Bot', 'Freenode object');
isa_ok($spread_revolutionary_date->targets->{liberachat}, 'App::SpreadRevolutionaryDate::Target::Liberachat', 'Liberachat class constructor');
isa_ok($spread_revolutionary_date->targets->{liberachat}->obj, 'App::SpreadRevolutionaryDate::Target::Liberachat::Bot', 'Liberachat object');

ok(!$spread_revolutionary_date->targets->{bluesky}->obj->{did}, 'Bluesky no connection with fake credentials');

eval { $spread_revolutionary_date->targets->{twitter}->obj->verify_credentials };
like($@, qr/^(?:Invalid or expired token|599 Internal Exception)/, 'Twitter no connection with fake credentials');

eval { $spread_revolutionary_date->targets->{mastodon}->obj->get_account };
like($@, qr/^Could not complete request: (?:500 Can't connect to Instance|599 Internal Exception|404 Not Found)/, 'Mastodon no connection with fake credentials');

__DATA__

test

[bluesky]

xt/authentication.t  view on Meta::CPAN

use App::SpreadRevolutionaryDate;

@ARGV = ('--test', '--twitter_api=1', '--targets=mastodon', '--targets=bluesky', '--targets=twitter');
my $spread_revolutionary_date = App::SpreadRevolutionaryDate->new;

eval { $spread_revolutionary_date->targets->{mastodon}->obj->get_account };
ok(!$@, 'Mastodon connection with actual credentials in user conf');

ok($spread_revolutionary_date->targets->{bluesky}->obj->{did}, 'Bluesky connection with actual credentials in user conf');

eval { $spread_revolutionary_date->targets->{twitter}->obj->verify_credentials };
ok(!$@, 'Twitter connection with actual credentials in user conf');



( run in 0.376 second using v1.01-cache-2.11-cpan-73692580452 )