Commit 30f11b72 authored by Jim Brandt's avatar Jim Brandt
Browse files

Add some basic tests

parent 262a0b55
use strict;
use warnings;
use RT::Extension::MandatoryOnTransition::Test tests => 20;
my ( $baseurl, $m ) = RT::Test->started_ok();
ok( $m->login( 'root', 'password' ), 'logged in' );
diag "Try a resolve without TimeWorked";
my $t = RT::Test->create_ticket(
Queue => 'General',
Subject => 'Test Mandatory On Resolve',
Content => 'Testing',
ok( $t->id, 'Created test ticket: ' . $t->id);
ok( $t->SetStatus('open'), 'Set status to open');
$m->follow_link_ok( { text => 'Resolve' }, 'Try to resolve ticket');
$m->submit_form_ok( { form_name => 'TicketUpdate',
button => 'SubmitTicket',},
'Submit resolve with no Time Worked');
$m->content_contains('Time Worked is required when changing Status to resolved');
$m->submit_form_ok( { form_name => 'TicketUpdate',
fields => { UpdateTimeWorked => 10 },
button => 'SubmitTicket',
}, 'Submit resolve with Time Worked');
$m->content_contains("TimeWorked changed from (no value) to '10'");
$m->content_contains("Status changed from 'open' to 'resolved'");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment