4 use RT::Test tests => undef;
6 my ($base, $m) = RT::Test->started_ok;
8 my $user = RT::Test->load_or_create_user(
10 Password => 'password',
14 ok $user->id, 'created user';
18 { Principal => 'privileged', Right => [qw(ModifySelf ShowTicket)] },
20 "granted ModifySelf to privileged"
23 my $ticket = RT::Test->create_ticket(
28 ok $ticket->id, 'created ticket';
31 $m->get_ok("$base/Prefs/Other.html");
32 my $format = 'Formatters';
34 form_name => 'ModifyPreferences',
36 DateTimeFormat => $format,
40 is $user->Preferences(RT->System, {})->{DateTimeFormat}, $format, 'set preference';
43 $m->get_ok("$base/Ticket/Display.html?id=" . $ticket->id);
44 $m->next_warning_like(qr/Invalid date formatter.+?\Q$format\E/, 'invalid formatter warning');
45 $m->content_lacks($_, "lacks formatter in page") for @RT::Date::FORMATTERS;