AWS-SNS-Verify

 view release on metacpan or  search on metacpan

author.t/01_verify.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Test::Exception;

use lib '../lib';

use_ok('AWS::SNS::Verify');


note "Happy path";

# this certificate is out of date, you need a new message and certificate as you're running these, which is why it is an author test

my $cert_string = <<END;
-----BEGIN CERTIFICATE-----

author.t/unicode.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Test::Exception;

use lib '../lib';
use_ok('AWS::SNS::Verify');

# this certificate is out of date, you need a new message and certificate as you're running these, which is why it is an author test

my $cert_string = <<END;
-----BEGIN CERTIFICATE-----
MIIFazCCBFOgAwIBAgIQDnuRfDcLJCFd0+nXpG2L3DANBgkqhkiG9w0BAQsFADBG
MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRUwEwYDVQQLEwxTZXJ2ZXIg
Q0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0xOTAyMDUwMDAwMDBaFw0yMDAxMjMx
MjAwMDBaMBwxGjAYBgNVBAMTEXNucy5hbWF6b25hd3MuY29tMIIBIjANBgkqhkiG

t/01_verify.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Test::Exception;

use lib '../lib';

use_ok('AWS::SNS::Verify');


note "Happy path";

my $cert_string = <<END;
-----BEGIN CERTIFICATE-----
MIIFFzCCA/+gAwIBAgIQfXvtWTP5lfZLpmyNHLk1TDANBgkqhkiG9w0BAQUFADCB
tTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL

t/02_valid_cert_url.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Test::Exception;

use lib '../lib';

use AWS::SNS::Verify;


my $sns = AWS::SNS::Verify->new(body => '');

throws_ok(
    sub { $sns->valid_cert_url(undef) },
    qr/\QThe SigningCertURL () isn't a valid URL/,
);



( run in 0.415 second using v1.01-cache-2.11-cpan-87723dcf8b7 )