LP#1188195: add tests for setting default client locale
authorGalen Charlton <gmc@esilibrary.com>
Tue, 6 Aug 2013 22:00:15 +0000 (22:00 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 6 Aug 2013 22:00:15 +0000 (22:00 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
src/perl/t/02-AppSession.t

index 1ac6673..01cce39 100644 (file)
@@ -1,7 +1,14 @@
 #!perl -T
 
-use Test::More tests => 1;
+use strict;
+use warnings;
+use Test::More tests => 3;
 
 BEGIN {
        use_ok( 'OpenSRF::AppSession' );
 }
+
+my $locale = OpenSRF::AppSession->default_locale('fr-CA');
+is($locale, 'fr-CA', 'got back the default locale we set');
+$locale = OpenSRF::AppSession->reset_locale();
+is($locale, 'en-US', 'got back en-US after reset of default locale');