Authen-Simple-Gmail

 view release on metacpan or  search on metacpan

t/00.load.t  view on Meta::CPAN


    # better way? patches welcome!
    my ( $username, $password ) = -e '.gmail.test.config' ? File::Slurp::read_file('.gmail.test.config') : ();
    chomp($username) if defined $username;
    chomp($password) if defined $password;
    skip 'Please specify a valid username and password (in that order on a line by itself) in .gmail.test.config', 2 unless $username && $password;

  SKIP: {
        skip 'These tests require connectivity to pop.gmail.com over port 995.', 2 unless detect_net( 'pop.gmail.com', 995 );

        ok( $gmail_auth->authenticate( $username, $password ), 'authenticate() valid credentials return true' );

        ok( !$gmail_auth->authenticate( $username, $password . $$ . time ), 'authenticate() invalid credentials return false' );
    }
}



( run in 0.233 second using v1.01-cache-2.11-cpan-4d50c553e7e )