Permalink
Browse files

Rename login test to session as it has expanded w/ contact list stuff

  • Loading branch information...
1 parent 7f864d9 commit 340126c706c8f6defe7391205ae9533e3de5c7c7 @sanko committed Mar 15, 2012
Showing with 13 additions and 6 deletions.
  1. +1 −1 MANIFEST
  2. +12 −5 t/100_active/101_session.t
View
@@ -9,4 +9,4 @@ META.json
META.yml
README
t/000_basic/001_use_ok.t
-t/100_active/101_login.t
+t/100_active/101_session.t
View
@@ -22,11 +22,18 @@ my $msn = AnyEvent::MSN->new(
},
on_error => sub {
my (undef, $msg, $fatal) = @_;
- diag ucfirst sprintf '%serror: %s', ($fatal ? 'fatal ' : ''), $msg;
- $cv->send;
+ note ucfirst sprintf '%serror: %s', ($fatal ? 'fatal ' : ''), $msg;
+ $cv->send if $fatal;
},
- on_user_notification =>
- sub { use Data::Dump; ddx shift->contacts; ddx \@_; ... }
+ on_user_notification => sub {
+ my ($s, $bud, $status) = @_;
+ return if $bud->{From} !~ $s->passport;
+ pass 'I came online!';
+
+ # XXX - Remove self from buddy list, wait to see self go offline
+ #$s->remove_contact($s->passport);
+ $cv->send;
+ }
);
$cv->recv;
done_testing;
@@ -41,7 +48,7 @@ CPAN ID: SANKO
=head1 License and Legal
-Copyright (C) 2011 by Sanko Robinson <sanko@cpan.org>
+Copyright (C) 2012 by Sanko Robinson <sanko@cpan.org>
This program is free software; you can redistribute it and/or modify it under
the terms of

0 comments on commit 340126c

Please sign in to comment.