perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 33 lines 983 B view raw
1use v5.34; 2use warnings; 3 4use Config (); 5use FindBin qw($Bin); 6use File::Spec; 7use Test2::V0; 8 9BEGIN { 10 require lib; 11 my $root = File::Spec->rel2abs(File::Spec->catdir($Bin, '..')); 12 lib->import( 13 File::Spec->catdir($root, 'lib'), 14 File::Spec->catdir($root, 'local', 'lib', 'perl5'), 15 File::Spec->catdir($root, 'local', 'lib', 'perl5', $Config::Config{archname}), 16 ); 17} 18 19use ATProto::PDS::LexiconCatalog qw(endpoint_catalog); 20 21my $root = File::Spec->rel2abs(File::Spec->catdir($Bin, '..')); 22my $catalog = endpoint_catalog($root); 23 24ok(@$catalog >= 70, 'loaded the upstream endpoint inventory'); 25 26my %by_id = map { $_->{id} => $_ } @$catalog; 27 28ok($by_id{'com.atproto.server.createAccount'}, 'createAccount exists'); 29ok($by_id{'com.atproto.repo.applyWrites'}, 'applyWrites exists'); 30ok($by_id{'com.atproto.sync.subscribeRepos'}, 'subscribeRepos exists'); 31is($by_id{'com.atproto.sync.subscribeRepos'}{type}, 'subscription', 'subscription type preserved'); 32 33done_testing;