[Rt-commit] [rtir] 07/14: Explicit returns for lib/RT/IR/Test/Web.pm

Kevin Falcone falcone at bestpractical.com
Wed Oct 8 18:11:57 EDT 2014


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch 3.4/perlcritic
in repository rtir.

commit f6888ba0f824a7e12988e28f81abb1de621e5b41
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Jul 22 12:35:57 2011 -0400

    Explicit returns for lib/RT/IR/Test/Web.pm
---
 lib/RT/IR/Test/Web.pm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index 42f2a29..662a61e 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -89,7 +89,7 @@ sub goto_create_rtir_ticket {
     );
 
     # set the form
-    $self->form_number(3);
+    return $self->form_number(3);
 }
 
 sub create_rtir_ticket_ok {
@@ -181,7 +181,7 @@ sub display_ticket {
     my $self = shift;
     my $id = shift;
 
-    $self->get_ok("/RTIR/Display.html?id=$id", "Loaded Display page for Ticket #$id");
+    return $self->get_ok("/RTIR/Display.html?id=$id", "Loaded Display page for Ticket #$id");
 }
 
 sub ticket_is_linked_to_inc {
@@ -222,7 +222,7 @@ sub ok_and_content_like {
     local $Test::Builder::Level = $Test::Builder::Level + 1;
     Test::More::is($self->status, 200, "request successful");
     #like($self->content, $re, $desc);
-    $self->content_like($re, $desc);
+    return $self->content_like($re, $desc);
 }
 
 
@@ -298,7 +298,7 @@ sub merge_ticket {
     
     Test::More::is ($self->status, 200, "Attempting to merge $type #$id to ticket #$id_to_merge_to");
     
-    $self->content_like(qr{.*<ul class="action-results">\s*<li>Merge Successful</li>.*}i, 
+    return $self->content_like(qr{.*<ul class="action-results">\s*<li>Merge Successful</li>.*}i, 
         "Successfully merged $type #$id to ticket #$id_to_merge_to");
 }
 
@@ -357,7 +357,7 @@ sub has_watchers {
 
     $self->display_ticket($id);
 
-    $self->content_like(
+    return $self->content_like(
 qr{<td class="labeltop">Correspondents:</td>\s*<td class="value">\s*<span class="user" data-user-id="\d+">\s*<a href="/User/Summary\.html\?id=\d+">\s*([@\w\.&;]+)\s*</a></span>}ms,
         "Found $type",
     );
@@ -369,7 +369,7 @@ sub goto_edit_block {
 
     $self->display_ticket($id);
 
-    $self->follow_link_ok( { text => 'Edit', n => '1' },
+    return $self->follow_link_ok( { text => 'Edit', n => '1' },
         "Followed 'Edit' (block) link" );
 }
 
@@ -386,7 +386,7 @@ sub resolve_rtir_ticket {
 
     Test::More::is( $self->status, 200, "Attempting to resolve $type #$id" );
 
-    $self->content_like(
+    return $self->content_like(
         qr/.*Status changed from \S*\w+\S* to \S*resolved.*/,
         "Successfully resolved $type #$id"
     );
@@ -440,6 +440,7 @@ sub bulk_abandon {
         $self->form_number(3);
         Test::More::ok( $self->value('BulkAbandon'), "Still on Bulk Abandon page" );
     }
+    return;
 }
 
 1;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list