File: 07_devpopup.t

package info (click to toggle)
libcgi-application-plugin-tt-perl 1.05%2B~cs1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 440 kB
  • sloc: perl: 806; makefile: 17
file content (30 lines) | stat: -rw-r--r-- 670 bytes parent folder | download | duplicates (5)
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
28
29
30
use Test::More;

use lib './t';
use strict;

BEGIN {
    $ENV{CAP_DEVPOPUP_EXEC} = 1;
    eval {
        require CGI::Application::Plugin::DevPopup;
    };

    if ($@) {
        plan skip_all => "CGI::Application::Plugin::DevPopup required for these tests";
        exit;
    }
}

plan tests => 3;

$ENV{CGI_APP_RETURN_ONLY} = 1;

use CGI;
use TestAppDevPopup;
my $t1_obj = TestAppDevPopup->new();
my $t1_output = $t1_obj->run();

like($t1_output, qr/template param\./, 'template parameter');
like($t1_output, qr/<div class="test"><\/div>/, 'HTML tags were encoded as entities');
like($t1_output, qr/TT params for/, 'popup title found');