[Opensrf-commits] r1761 - trunk/src/perl/t (sboyette)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Aug 28 16:31:36 EDT 2009


Author: sboyette
Date: 2009-08-28 16:31:30 -0400 (Fri, 28 Aug 2009)
New Revision: 1761

Modified:
   trunk/src/perl/t/09-Utils-JSON.t
Log:
first tests

Modified: trunk/src/perl/t/09-Utils-JSON.t
===================================================================
--- trunk/src/perl/t/09-Utils-JSON.t	2009-08-28 20:31:30 UTC (rev 1760)
+++ trunk/src/perl/t/09-Utils-JSON.t	2009-08-28 20:31:30 UTC (rev 1761)
@@ -1,7 +1,18 @@
 #!perl -T
 
-use Test::More tests => 1;
+use Test::More tests => 6;
 
-BEGIN {
-	use_ok( 'OpenSRF::Utils::JSON' );
-}
+use OpenSRF::Utils::JSON;
+
+# do we have a JSON::XS object?
+is (ref $OpenSRF::Utils::JSON::parser,   'JSON::XS');
+
+# make sure the class and payload keys are as expected
+is ($OpenSRF::Utils::JSON::JSON_CLASS_KEY,   '__c');
+is ($OpenSRF::Utils::JSON::JSON_PAYLOAD_KEY, '__p');
+
+# start with the simplest bits possible
+is (OpenSRF::Utils::JSON::true, 1);
+is (OpenSRF::Utils::JSON->true, 1);
+is (OpenSRF::Utils::JSON->false, 0);
+



More information about the opensrf-commits mailing list