- my $form = $m->form_name('TicketUpdate');
- ok my $input = $form->find_input( 'UseKey-rt-test@example.com' ), 'found key selector';
- is scalar $input->possible_values, 2, 'two options';
+ if ($encrypt) {
+ $m->content_contains(
+ 'You are going to encrypt outgoing email messages',
+ 'problems with keys'
+ );
+ $m->content_contains(
+ 'There are several keys suitable for encryption',
+ 'problems with keys'
+ );
+
+ my $form = $m->form_name('TicketUpdate');
+ ok my $input = $form->find_input( 'UseKey-rt-test@example.com' ), 'found key selector';
+ is scalar $input->possible_values, 2, 'two options';
+
+ $m->select( 'UseKey-rt-test@example.com' => $fpr1 );
+ $m->click('SubmitTicket');
+ }