[Rt-commit] rt branch, 4.4/core-spawnlinkedticketinqueue, repushed

Todd Wade todd at bestpractical.com
Fri Oct 30 23:47:56 EDT 2015


The branch 4.4/core-spawnlinkedticketinqueue was deleted and repushed:
       was dd140a8755843f9736437a894320efc78ff9fadc
       now 248b2f5d1a97ac200efee45f4f5fccb5e51e065f

1:  dd140a8 ! 1:  248b2f5 core RT-Extension-SpawnLinkedTicketInQueue
    @@ -4,6 +4,14 @@
         
         Add controls to create linked tickets in the Links block on the ticket
         display page.
    +    
    +    t/web/helpers-http-cache-headers.t
    +    - provide a way to exclude header checking for a given helper
    +    - SpawnLinkedTicket can exclude cache headers because it is a redirect
    +    
    +    t/web/ticket_display_unset_fields.t
    +    - new code adds content that should not be there according to tests
    +      + update tests to check for link labels (add the : in the check)
     
     diff --git a/share/html/Elements/ShowLinks b/share/html/Elements/ShowLinks
     --- a/share/html/Elements/ShowLinks
    @@ -101,3 +109,54 @@
     +$CloneQueue => undef
     +$LinkType => undef
     +</%ARGS>
    +
    +diff --git a/t/web/helpers-http-cache-headers.t b/t/web/helpers-http-cache-headers.t
    +--- a/t/web/helpers-http-cache-headers.t
    ++++ b/t/web/helpers-http-cache-headers.t
    +@@
    + 
    + my $docroot = join '/', qw(share html);
    + 
    ++# files to exclude from testing headers
    ++my @exclude = (
    ++    'SpawnLinkedTicket', # results in redirect, expires header not expected
    ++);
    ++
    + # find endpoints to loop over
    + my @endpoints = (
    +     "/NoAuth/css/aileron/squished-".("0"x32).".css",
    +@@
    +     if ( -f $_ && $_ !~ m|autohandler$| ) {
    +       return if m{/\.[^/]+\.sw[op]$}; # vim swap files
    +       ( my $endpoint = $_ ) =~ s|^$docroot||;
    ++      return if grep $endpoint =~ m{/$_$}, @exclude;
    +       push @endpoints, $endpoint;
    +     }
    +   },
    +
    +diff --git a/t/web/ticket_display_unset_fields.t b/t/web/ticket_display_unset_fields.t
    +--- a/t/web/ticket_display_unset_fields.t
    ++++ b/t/web/ticket_display_unset_fields.t
    +@@
    + 
    +     $m->content_contains( "Last Contact", "has Told as root can set it" );
    +     for my $label (@link_labels) {
    +-        $m->content_contains( "$label", "has $label as root can create" );
    ++        $m->content_contains( "$label:", "has $label as root can create" );
    +     }
    + 
    +     $m->goto_ticket( $bar->id );
    +@@
    +     $m->goto_ticket( $foo->id );
    +     $m->content_lacks( "Last Contact", "lacks Told as it is unset" );
    +     for my $label ( @link_labels ) {
    +-        $m->content_lacks( $label, "lacks $label as it is unset" );
    ++        $m->content_lacks( "$label:", "lacks $label as it is unset" );
    +     }
    + 
    +     $m->goto_ticket( $bar->id );
    +-    $m->content_contains( "Depends on", "has Depends on as it is set" );
    ++    $m->content_contains( "Depends on:", "has Depends on as it is set" );
    + }
    + 
    + undef $m;



More information about the rt-commit mailing list