File: plugin-overlays.t

package info (click to toggle)
request-tracker5 5.0.7%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 80,216 kB
  • sloc: javascript: 191,898; perl: 87,146; sh: 1,412; makefile: 487; python: 37; php: 15
file content (29 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (6)
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
use strict;
use warnings;

BEGIN {
    use Test::More;
    plan skip_all => "Testing the rt-server init sequence in isolation requires Apache"
        unless ($ENV{RT_TEST_WEB_HANDLER} || '') =~ /^apache/;
}

use JSON qw(from_json);

use RT::Test
    tests   => undef,
    plugins => ["Overlays"];

my ($base, $m) = RT::Test->started_ok;

# Check that the overlay was actually loaded
$m->get_ok("$base/overlay_loaded");
is $m->content, "yes", "Plugin's RT/User_Local.pm was loaded";

# Check accessible is correct and doesn't need to be rebuilt from overlay
$m->get_ok("$base/user_accessible");
ok $m->content, "Received some content";

my $info = from_json($m->content) || {};
ok $info->{Comments}{public}, "User.Comments is marked public via overlay";

done_testing;