fixed namespaces
[p5sagit/Email-Archive.git] / t / basic.t
index 8f959f5..4dbdc75 100644 (file)
--- a/t/basic.t
+++ b/t/basic.t
@@ -6,6 +6,7 @@ use Email::MIME;
 use Test::More;
 
 use Email::Archive;
+use Email::Archive::Storage::DBIC;
 
 my $email = Email::MIME->create(
     header => [
@@ -25,5 +26,17 @@ my $found = $e->retrieve('helloworld');
 cmp_ok($found->header('subject'), 'eq', "Message in a bottle",
   "can find stored message by ID");
 
+my $e_dbic = Email::Archive->new(
+    storage => Email::Archive::Storage::DBIC->new,
+);
+$e_dbic->connect('dbi:SQLite:dbname=t/test_dbic.db');
+$e_dbic->store($email);
+
+$found = $e_dbic->retrieve('helloworld');
+cmp_ok($found->header('subject'), 'eq', "Message in a bottle",
+  "can find stored message by ID");
+
+
 done_testing;
 unlink 't/test.db';
+unlink 't/dbic_test.db';