|
|
@@ -1,23 +1,14 @@
|
|
|
use strict;
|
|
|
use warnings;
|
|
|
|
|
|
-use Test::More 'tests' => 5;
|
|
|
-use Test::Fatal;
|
|
|
-
|
|
|
-# ================================
|
|
|
-# MOCK ME BABY ALL NIGHT LONG
|
|
|
-# ================================
|
|
|
-package Cpanel::iContact::Provider;
|
|
|
+use Cwd qw{abs_path};
|
|
|
+use File::Basename qw{dirname};
|
|
|
+use lib abs_path( dirname(__FILE__) . "/../lib" );
|
|
|
|
|
|
-sub new {
|
|
|
- my $class = shift;
|
|
|
- my $self = {
|
|
|
- 'widdly' => 'waa',
|
|
|
- };
|
|
|
- return bless $self, $class;
|
|
|
-}
|
|
|
+use Test::More 'tests' => 4;
|
|
|
+use Test::Fatal;
|
|
|
|
|
|
-is( exception { require Cpanel::iContact::Provider; }, undef, 'Module at least compiles' );
|
|
|
+is( exception { require Cpanel::iContact::Provider::XMPP; }, undef, 'Module at least compiles' );
|
|
|
isa_ok( my $xmpp = Cpanel::iContact::Provider::XMPP->new(), "Cpanel::iContact::Provider::XMPP" );
|
|
|
my $sent;
|
|
|
{
|
|
|
@@ -30,5 +21,5 @@ my $sent;
|
|
|
}
|
|
|
ok( $sent, "...and the message appears to have actually sent." );
|
|
|
|
|
|
-# TODO more error paths
|
|
|
+# TODO error paths
|
|
|
#isnt( exception { $xmpp->send(); }, undef, "We blew up when we timed out on connect" );
|