[Rt-commit] r8466 - rtir/branches/2.3-EXPERIMENTAL/t/constituency

ruz at bestpractical.com ruz at bestpractical.com
Wed Aug 8 23:38:17 EDT 2007


Author: ruz
Date: Wed Aug  8 23:38:17 2007
New Revision: 8466

Modified:
   rtir/branches/2.3-EXPERIMENTAL/t/constituency/basics.t
   rtir/branches/2.3-EXPERIMENTAL/t/constituency/propagation-no.t

Log:
* update constituency tests

Modified: rtir/branches/2.3-EXPERIMENTAL/t/constituency/basics.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/constituency/basics.t	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/constituency/basics.t	Wed Aug  8 23:38:17 2007
@@ -204,46 +204,6 @@
     is( $ticket->FirstCustomFieldValue('_RTIR_Constituency'), 'GOVNET', 'correct value' );
 }
 
-diag "create an IR and check that we couldn't change value during creation of new linked incident" if $ENV{'TEST_VERBOSE'};
-{
-    # create an IR
-    my $ir_id = create_ir(
-        $agent, { Subject => "test" }, { Constituency => 'GOVNET' }
-    );
-    ok( $ir_id, "created ticket #$ir_id" );
-    display_ticket($agent, $ir_id);
-    $agent->content_like( qr/GOVNET/, "value on the page" );
-    my $ticket = RT::Ticket->new( $RT::SystemUser );
-    $ticket->Load( $ir_id );
-    ok( $ticket->id, 'loaded ticket' );
-    is( $ticket->QueueObj->Name, 'Incident Reports', 'correct value' );
-    is( $ticket->FirstCustomFieldValue('_RTIR_Constituency'), 'GOVNET', 'correct value' );
-
-    # click [new] near 'incident', set another constituency and create
-    $agent->follow_link_ok({text => '[New]'}, "go to 'New Incident' page");
-    $agent->form_number(3);
-    ok(!eval{ set_custom_field( $agent, Constituency => 'EDUNET' ) }, "couldn't change value in the form");
-    $agent->click('CreateIncident');
-    is ($agent->status, 200, "Attempted to create the ticket");
-
-    DBIx::SearchBuilder::Record::Cachable::FlushCache();
-
-    # Incident has the new value 
-    my $inc_id = get_ticket_id( $agent );
-    $ticket = RT::Ticket->new( $RT::SystemUser );
-    $ticket->Load( $inc_id );
-    ok( $ticket->id, 'loaded ticket' );
-    is( $ticket->QueueObj->Name, 'Incidents', 'correct value' );
-    is( $ticket->FirstCustomFieldValue('_RTIR_Constituency'), 'GOVNET', 'correct value' );
-
-    # Incident's value is prefered and was inhertied by the IR
-    $ticket = RT::Ticket->new( $RT::SystemUser );
-    $ticket->Load( $ir_id );
-    ok( $ticket->id, 'loaded ticket' );
-    is( $ticket->QueueObj->Name, 'Incident Reports', 'correct value' );
-    is( $ticket->FirstCustomFieldValue('_RTIR_Constituency'), 'GOVNET', 'correct value' );
-}
-
 my $eduhandler = RT::User->new($RT::SystemUser);
 $eduhandler->Create(Name => 'eduhandler-'.$$, Privileged => 1);
 ok($eduhandler->id, "Created eduhandler");

Modified: rtir/branches/2.3-EXPERIMENTAL/t/constituency/propagation-no.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/constituency/propagation-no.t	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/constituency/propagation-no.t	Wed Aug  8 23:38:17 2007
@@ -29,7 +29,7 @@
 my $agent = default_agent();
 my $rtir_user = rtir_user();
 
-diag "create an incident with EDUNET and linked tickets with GOVNET"
+diag "create an incident with EDUNET and then linked tickets with GOVNET,"
     . " constituency shouldn't propagate back to tickets"
     if $ENV{'TEST_VERBOSE'};
 {


More information about the Rt-commit mailing list