RT 4.0.22
[freeside.git] / rt / t / web / plugin-overlays.t
1 use strict;
2 use warnings;
3
4 BEGIN {
5     use Test::More;
6     plan skip_all => "Testing the rt-server init sequence in isolation requires Apache"
7         unless ($ENV{RT_TEST_WEB_HANDLER} || '') =~ /^apache/;
8 }
9
10 use JSON qw(from_json);
11
12 use RT::Test
13     tests   => undef,
14     plugins => ["Overlays"];
15
16 my ($base, $m) = RT::Test->started_ok;
17
18 # Check that the overlay was actually loaded
19 $m->get_ok("$base/overlay_loaded");
20 is $m->content, "yes", "Plugin's RT/User_Local.pm was loaded";
21
22 # Check accessible is correct and doesn't need to be rebuilt from overlay
23 $m->get_ok("$base/user_accessible");
24 ok $m->content, "Received some content";
25
26 my $info = from_json($m->content) || {};
27 ok $info->{Comments}{public}, "User.Comments is marked public via overlay";
28
29 undef $m;
30 done_testing;