diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-10-04 20:25:37 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-10-04 20:25:37 -0700 |
| commit | 0af38652da3b3be7da2d35b048285ef6f2194e1a (patch) | |
| tree | c43e871e406a11ad9ddca7f5af225f8e5e507000 /rt/t/api/config.t | |
| parent | a8e1cb65cd92239721b8e81ef9fdf99f60fb3c3c (diff) | |
| parent | 51b5bd15c154065a9a0f521565bd6187609c8348 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'rt/t/api/config.t')
| -rw-r--r-- | rt/t/api/config.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rt/t/api/config.t b/rt/t/api/config.t index a986c3c4f..62b77dffa 100644 --- a/rt/t/api/config.t +++ b/rt/t/api/config.t @@ -1,7 +1,8 @@ use strict; use warnings; use RT; -use RT::Test nodb => 1, tests => 9; +use RT::Test nodb => 1, tests => 11; +use Test::Warn; ok( RT::Config->AddOption( @@ -31,3 +32,12 @@ is( $meta->{Widget}, '/Widgets/Form/Boolean', 'widget is updated to boolean' ); ok( RT::Config->DeleteOption( Name => 'foo' ), 'removed option foo' ); is( RT::Config->Meta('foo'), undef, 'foo is indeed deleted' ); +# Test EmailInputEncodings PostLoadCheck code +RT::Config->Set('EmailInputEncodings', qw(utf-8 iso-8859-1 us-ascii foo)); +my @encodings = qw(utf-8-strict iso-8859-1 ascii); + +warning_is {RT::Config->PostLoadCheck} "Unknown encoding 'foo' in \@EmailInputEncodings option", + 'Correct warning for encoding foo'; + +my @canonical_encodings = RT::Config->Get('EmailInputEncodings'); +is_deeply(\@encodings, \@canonical_encodings, 'Got correct encoding list'); |
