Merge branch 'patch-5' of https://github.com/gjones2/Freeside (#13854 as this bug...
[freeside.git] / rt / t / i18n / caching.t
1 #!/usr/bin/perl -w
2 use strict;
3 use warnings;
4
5 use RT::Test;
6
7 {
8     my $french = RT::User->new(RT->SystemUser);
9     $french->LoadOrCreateByEmail('french@example.com');
10     $french->SetName('french');
11     $french->SetLang('fr');
12     $french->SetPrivileged(1);
13     $french->SetPassword('password');
14     $french->PrincipalObj->GrantRight(Right => 'SuperUser');
15 }
16
17
18 my ($baseurl, $m) = RT::Test->started_ok;
19 $m->login( root => "password" );
20 $m->get_ok('/Prefs/Other.html');
21 $m->content_lacks('Ne pas','Lacks translated french');
22 $m->get_ok( "/NoAuth/Logout.html" );
23
24 $m->login( french => "password" );
25 $m->get_ok('/Prefs/Other.html');
26 $m->content_contains('Ne pas','Has translated french');
27 $m->get_ok( "/NoAuth/Logout.html" ); # ->logout fails because it's translated
28
29 $m->login( root => "password" );
30 $m->get_ok('/Prefs/Other.html');
31 $m->content_lacks('Ne pas','Lacks translated french');
32
33 undef $m;