File: fif_class.t

package info (click to toggle)
libcgi-application-plugin-validaterm-perl 2.52-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 124 kB
  • sloc: perl: 143; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use Test::More tests => 3;
BEGIN { use_ok('CGI::Application::Plugin::ValidateRM') };

use lib './t';
use strict;

$ENV{CGI_APP_RETURN_ONLY} = 1;

use CGI;
use TestApp1;
my $app = TestApp1->new(QUERY=>CGI->new("email=broken;rm=form_process"));
my $output = $app->run();
unlike($output, qr/Filler Up/);

$app->param(dfv_fif_class => 'TestFormFiller');
$output = $app->run();
like($output, qr/Filler Up/);
exit(0);

package TestFormFiller;
use strict;
use warnings;

sub new { bless {}, $_[0] }
sub fill { "Filler Up!" }

1;