]> git.donarmstrong.com Git - debbugs.git/blobdiff - t/22_oo_interface.t
add submit_but and run_processall utility routines
[debbugs.git] / t / 22_oo_interface.t
index a14b68574ad5eda56c58444fc2770feac9b33ed8..55a6b527261afc3b68e2941e98046edd74725cf2 100644 (file)
@@ -35,21 +35,13 @@ $tests++;
 
 # create 4 bugs
 for (1..4) {
-    send_message(to=>'submit@bugs.something',
-                headers => [To   => 'submit@bugs.something',
-                            From => 'foo@bugs.something',
-                            Subject => 'Submitting a bug '.$_,
-                           ],
-                run_processall => ($_ == 4 ? 1 : 0),
-                body => <<EOF) or fail('Unable to send message');
-Package: foo
-Severity: normal
-Tags: wontfix moreinfo
-
-This is a silly bug $_
-EOF
+    submit_bug(subject => 'Submitting a bug '.$_,
+              pseudoheaders => {Severity => 'normal',
+                                Tags => 'wontfix moreinfo',
+                               },
+             );
 }
-
+run_processall();
 
 my $bc = Debbugs::Collection::Bug->new(bugs => [1..4]);