From: Chris Nehren Date: Sun, 4 Sep 2011 05:59:50 +0000 (-0400) Subject: more tests for lists X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e1977eccd93c82d06981105d0b32742e8cd6531;p=p5sagit%2FPromulger.git more tests for lists --- diff --git a/t/list.t b/t/list.t index 00a87c9..a398ab9 100644 --- a/t/list.t +++ b/t/list.t @@ -78,6 +78,21 @@ CONFIG ); lives_ok { $list->subscribe('foo@example.com') } "can subscribe someone"; + $list = List->resolve('foo'); + cmp_deeply( + $list->subscribers, + { + 'foo@example.com' => 1, + }, + "subscribing a user adds them to the serialized data", + ); + lives_ok { $list->unsubscribe('foo@example.com') } "can unsubscribe someone"; + $list = List->resolve('foo'); + cmp_deeply( + $list->subscribers, + { }, + "unsubscribing a user removes them from the serialized data", + ); } done_testing;