[Rt-commit] rt branch, html-templates, updated. rt-3.9.6-37-g63f71d1

Thomas Sibley trs at bestpractical.com
Wed Nov 24 18:49:06 EST 2010


The branch, html-templates has been updated
       via  63f71d1e7767f5bced716968cb07ecd07cd897e6 (commit)
      from  120cf321a4368c2ac2daa3a10d771b96330fa53a (commit)

Summary of changes:
 lib/RT/Test.pm |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 63f71d1e7767f5bced716968cb07ecd07cd897e6
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Nov 24 18:48:21 2010 -0500

    Add a switch_templates_ok method to switch and test the exit code

diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 0b3e05e..09af6c0 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -801,6 +801,25 @@ sub switch_templates_to {
     );
 }
 
+=head2 switch_templates_ok TYPE
+
+Calls L<switch_template_to> and tests the return values.
+
+=cut
+
+sub switch_templates_ok {
+    my $self = shift;
+    my $type = shift;
+
+    my ($exit, $output) = $self->switch_templates_to($type);
+
+    Test::More::ok(not ($exit >> 8), "Switched templates to $type cleanly");
+    diag("**** etc/upgrade/switch-templates-to exited with $num:\n$output")
+        if $exit >> 8;
+
+    return ($exit, $output);
+}
+
 sub run_mailgate {
     my $self = shift;
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list